summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2006-01-26 20:34:27 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2006-01-26 20:34:27 +0000
commitc8f5fa24f30170186fc9af2f82f22737a9166d19 (patch)
tree8a762b93b85ac64b7675bca67c9e7c476fb8e695 /sys
parent12b9837c0875f1a6ca8192700391fffc5b24b987 (diff)
make timecounter behave; grange@ ok
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/i386/pci/gscpm.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/sys/arch/i386/pci/gscpm.c b/sys/arch/i386/pci/gscpm.c
index 7cb0d2604e5..3117c9081fe 100644
--- a/sys/arch/i386/pci/gscpm.c
+++ b/sys/arch/i386/pci/gscpm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: gscpm.c,v 1.3 2004/10/05 19:02:33 grange Exp $ */
+/* $OpenBSD: gscpm.c,v 1.4 2006/01/26 20:34:26 mickey Exp $ */
/*
* Copyright (c) 2004 Alexander Yurchenko <grange@openbsd.org>
*
@@ -135,18 +135,8 @@ u_int
gscpm_get_timecount(struct timecounter *tc)
{
struct gscpm_softc *sc = tc->tc_priv;
- u_int u1, u2, u3;
-
- u2 = bus_space_read_4(sc->sc_iot, sc->sc_acpi_ioh, GSCPM_PM_TMR);
- u3 = bus_space_read_4(sc->sc_iot, sc->sc_acpi_ioh, GSCPM_PM_TMR);
- do {
- u1 = u2;
- u2 = u3;
- u3 = bus_space_read_4(sc->sc_iot, sc->sc_acpi_ioh,
- GSCPM_PM_TMR);
- } while (u1 > u2 || u2 > u3);
-
- return (u2);
+
+ return (bus_space_read_4(sc->sc_iot, sc->sc_acpi_ioh, GSCPM_PM_TMR));
}
#endif /* __HAVE_TIMECOUNTER */