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/kern/kern_sysctl.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'sys/kern/kern_sysctl.c') diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c index 4b83109ba96..9599fe397ad 100644 --- a/sys/kern/kern_sysctl.c +++ b/sys/kern/kern_sysctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_sysctl.c,v 1.117 2004/06/28 01:34:46 aaron Exp $ */ +/* $OpenBSD: kern_sysctl.c,v 1.118 2004/07/28 17:15:12 tholo Exp $ */ /* $NetBSD: kern_sysctl.c,v 1.17 1996/05/20 17:49:05 mrg Exp $ */ /*- @@ -62,6 +62,9 @@ #include #include #include +#ifdef __HAVE_TIMECOUNTER +#include +#endif #ifdef __HAVE_EVCOUNT #include #endif @@ -284,6 +287,9 @@ kern_sysctl(name, namelen, oldp, oldlenp, newp, newlen, p) case KERN_EMUL: #ifdef __HAVE_EVCOUNT case KERN_EVCOUNT: +#endif +#ifdef __HAVE_TIMECOUNTER + case KERN_TIMECOUNTER: #endif break; default: @@ -527,6 +533,11 @@ kern_sysctl(name, namelen, oldp, oldlenp, newp, newlen, p) case KERN_EVCOUNT: return (evcount_sysctl(name + 1, namelen - 1, oldp, oldlenp, newp, newlen)); +#endif +#ifdef __HAVE_TIMECOUNTER + case KERN_TIMECOUNTER: + return (sysctl_tc(name + 1, namelen - 1, oldp, oldlenp, + newp, newlen)); #endif default: return (EOPNOTSUPP); -- cgit v1.2.3