summaryrefslogtreecommitdiff
path: root/sys/arch/i386
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2012-08-16 18:42:05 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2012-08-16 18:42:05 +0000
commit6abd5d8bff69241fcfc49372af3a0a4ac2960f1b (patch)
treec27412007fb60f0a00e042ff3cc615a7b65a2fb6 /sys/arch/i386
parentb6314326114bec33f9e727e1692ad9ea3ef3369e (diff)
we are past the point where timecounters may disappear
ok miod
Diffstat (limited to 'sys/arch/i386')
-rw-r--r--sys/arch/i386/pci/geodesc.c10
-rw-r--r--sys/arch/i386/pci/gscpm.c10
-rw-r--r--sys/arch/i386/pci/ichpcib.c10
3 files changed, 3 insertions, 27 deletions
diff --git a/sys/arch/i386/pci/geodesc.c b/sys/arch/i386/pci/geodesc.c
index 128c5caa0fc..b9e74f84564 100644
--- a/sys/arch/i386/pci/geodesc.c
+++ b/sys/arch/i386/pci/geodesc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: geodesc.c,v 1.9 2006/12/11 20:57:40 deraadt Exp $ */
+/* $OpenBSD: geodesc.c,v 1.10 2012/08/16 18:42:04 tedu Exp $ */
/*
* Copyright (c) 2003 Markus Friedl <markus@openbsd.org>
@@ -25,9 +25,7 @@
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/device.h>
-#ifdef __HAVE_TIMECOUNTER
#include <sys/timetc.h>
-#endif
#include <machine/bus.h>
@@ -58,7 +56,6 @@ struct cfdriver geodesc_cd = {
NULL, "geodesc", DV_DULL
};
-#ifdef __HAVE_TIMECOUNTER
u_int geodesc_get_timecount(struct timecounter *tc);
struct timecounter geodesc_timecounter = {
@@ -69,7 +66,6 @@ struct timecounter geodesc_timecounter = {
"GEOTSC", /* name */
2000 /* quality */
};
-#endif /* __HAVE_TIMECOUNTER */
int
geodesc_match(struct device *parent, void *match, void *aux)
@@ -127,12 +123,10 @@ geodesc_attach(struct device *parent, struct device *self, void *aux)
wdog_register(sc, geodesc_wdogctl_cb);
#endif /* SMALL_KERNEL */
-#ifdef __HAVE_TIMECOUNTER
bus_space_write_4(sc->sc_iot, sc->sc_ioh, GCB_TSCNFG, TSC_ENABLE);
/* Hook into the kern_tc */
geodesc_timecounter.tc_priv = sc;
tc_init(&geodesc_timecounter);
-#endif /* __HAVE_TIMECOUNTER */
/* We have a special way to reset the CPU on the SC1100 */
cpuresetfn = sc1100_sysreset;
@@ -151,7 +145,6 @@ geodesc_wdogctl_cb(void *self, int period)
}
#endif /* SMALL_KERNEL */
-#ifdef __HAVE_TIMECOUNTER
u_int
geodesc_get_timecount(struct timecounter *tc)
{
@@ -159,7 +152,6 @@ geodesc_get_timecount(struct timecounter *tc)
return (bus_space_read_4(sc->sc_iot, sc->sc_ioh, GCB_TSC));
}
-#endif /* __HAVE_TIMECOUNTER */
void
sc1100_sysreset(void)
diff --git a/sys/arch/i386/pci/gscpm.c b/sys/arch/i386/pci/gscpm.c
index abcbfa040ad..8b8aa4ac430 100644
--- a/sys/arch/i386/pci/gscpm.c
+++ b/sys/arch/i386/pci/gscpm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: gscpm.c,v 1.8 2010/08/02 04:37:42 deraadt Exp $ */
+/* $OpenBSD: gscpm.c,v 1.9 2012/08/16 18:42:04 tedu Exp $ */
/*
* Copyright (c) 2004 Alexander Yurchenko <grange@openbsd.org>
*
@@ -23,9 +23,7 @@
#include <sys/systm.h>
#include <sys/device.h>
#include <sys/kernel.h>
-#ifdef __HAVE_TIMECOUNTER
#include <sys/timetc.h>
-#endif
#include <machine/bus.h>
@@ -49,7 +47,6 @@ void gscpm_attach(struct device *, struct device *, void *);
void gscpm_setperf(int);
-#ifdef __HAVE_TIMECOUNTER
u_int gscpm_get_timecount(struct timecounter *tc);
struct timecounter gscpm_timecounter = {
@@ -60,7 +57,6 @@ struct timecounter gscpm_timecounter = {
"GSCPM", /* name */
1000 /* quality */
};
-#endif /* __HAVE_TIMECOUNTER */
struct cfattach gscpm_ca = {
sizeof (struct gscpm_softc),
@@ -115,11 +111,9 @@ gscpm_attach(struct device *parent, struct device *self, void *aux)
printf("\n");
-#ifdef __HAVE_TIMECOUNTER
/* Hook into the kern_tc */
gscpm_timecounter.tc_priv = sc;
tc_init(&gscpm_timecounter);
-#endif /* __HAVE_TIMECOUNTER */
/* XXX: disabled due to unresolved yet hardware errata */
#if 0
@@ -130,7 +124,6 @@ gscpm_attach(struct device *parent, struct device *self, void *aux)
}
-#ifdef __HAVE_TIMECOUNTER
u_int
gscpm_get_timecount(struct timecounter *tc)
{
@@ -138,7 +131,6 @@ gscpm_get_timecount(struct timecounter *tc)
return (bus_space_read_4(sc->sc_iot, sc->sc_acpi_ioh, GSCPM_PM_TMR));
}
-#endif /* __HAVE_TIMECOUNTER */
#if 0
void
diff --git a/sys/arch/i386/pci/ichpcib.c b/sys/arch/i386/pci/ichpcib.c
index 3ae1ea50d04..c35e2259130 100644
--- a/sys/arch/i386/pci/ichpcib.c
+++ b/sys/arch/i386/pci/ichpcib.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ichpcib.c,v 1.25 2010/07/08 20:17:54 deraadt Exp $ */
+/* $OpenBSD: ichpcib.c,v 1.26 2012/08/16 18:42:04 tedu Exp $ */
/*
* Copyright (c) 2004 Alexander Yurchenko <grange@openbsd.org>
*
@@ -27,9 +27,7 @@
#include <sys/device.h>
#include <sys/proc.h>
#include <sys/sysctl.h>
-#ifdef __HAVE_TIMECOUNTER
#include <sys/timetc.h>
-#endif
#include <machine/bus.h>
@@ -58,7 +56,6 @@ void ichss_setperf(int);
/* arch/i386/pci/pcib.c */
void pcibattach(struct device *, struct device *, void *);
-#ifdef __HAVE_TIMECOUNTER
u_int ichpcib_get_timecount(struct timecounter *tc);
struct timecounter ichpcib_timecounter = {
@@ -69,7 +66,6 @@ struct timecounter ichpcib_timecounter = {
"ICHPM", /* name */
1000 /* quality */
};
-#endif /* __HAVE_TIMECOUNTER */
struct cfattach ichpcib_ca = {
sizeof(struct ichpcib_softc),
@@ -146,7 +142,6 @@ ichpcib_attach(struct device *parent, struct device *self, void *aux)
ICH_PMSIZE, 0, &sc->sc_pm_ioh) != 0)
goto corepcib;
-#ifdef __HAVE_TIMECOUNTER
/* Register new timecounter */
ichpcib_timecounter.tc_priv = sc;
tc_init(&ichpcib_timecounter);
@@ -154,7 +149,6 @@ ichpcib_attach(struct device *parent, struct device *self, void *aux)
printf(": %s-bit timer at %lluHz",
(ichpcib_timecounter.tc_counter_mask == 0xffffffff ? "32" : "24"),
(unsigned long long)ichpcib_timecounter.tc_frequency);
-#endif /* __HAVE_TIMECOUNTER */
#ifndef SMALL_KERNEL
/* Check for SpeedStep */
@@ -304,7 +298,6 @@ ichss_setperf(int level)
}
#endif /* !SMALL_KERNEL */
-#ifdef __HAVE_TIMECOUNTER
u_int
ichpcib_get_timecount(struct timecounter *tc)
{
@@ -322,4 +315,3 @@ ichpcib_get_timecount(struct timecounter *tc)
return (u2);
}
-#endif /* __HAVE_TIMECOUNTER */