From c65eb6dac1a01e8aedf3be76a030db86be9264f4 Mon Sep 17 00:00:00 2001 From: Thorsten Lockert Date: Wed, 28 Jul 2004 17:15:13 +0000 Subject: This touches only MI code, and adds new time keeping code. The code is all conditionalized on __HAVE_TIMECOUNTER, and not enabled on any platforms. adjtime(2) support exists, courtesy of nordin@, sysctl(2) support and a concept of quality for each time source attached exists. High quality time sources exists for PIIX4 ACPI timer as well as some AMD power management chips. This will have to be redone once we actually add ACPI support (at that time we need to use the ACPI interfaces to get at these clocks). ok art@ ken@ miod@ jmc@ and many more --- sys/altq/altq_subr.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'sys/altq/altq_subr.c') diff --git a/sys/altq/altq_subr.c b/sys/altq/altq_subr.c index 8e339d6f762..89fc5071989 100644 --- a/sys/altq/altq_subr.c +++ b/sys/altq/altq_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: altq_subr.c,v 1.18 2004/06/24 19:35:22 tholo Exp $ */ +/* $OpenBSD: altq_subr.c,v 1.19 2004/07/28 17:15:12 tholo Exp $ */ /* $KAME: altq_subr.c,v 1.11 2002/01/11 08:11:49 kjc Exp $ */ /* @@ -746,6 +746,14 @@ init_machclk(void) #if defined(__NetBSD__) && defined(MULTIPROCESSOR) machclk_usepcc = 0; #endif +#if defined(__OpenBSD__) && defined(__HAVE_TIMECOUNTER) + /* + * If we have timecounters, microtime is good enough and we can + * avoid problems on machines with variable cycle counter + * frequencies. + */ + machclk_usepcc = 0; +#endif #ifdef __i386__ /* check if TSC is available */ if (machclk_usepcc == 1 && (cpu_feature & CPUID_TSC) == 0) -- cgit v1.2.3