summaryrefslogtreecommitdiffstats
path: root/sys/ia64/include/clock.h
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2003-08-04 05:13:18 +0000
committermarcel <marcel@FreeBSD.org>2003-08-04 05:13:18 +0000
commitd5a33e59d13687ecea3a42a2b0b563e2b45dfaa2 (patch)
tree53c0285dd78b50088e45353c7f9f616322b81ed4 /sys/ia64/include/clock.h
parent321771d2627fb7dfe7408a8f7a6bc6dd85ddac97 (diff)
downloadFreeBSD-src-d5a33e59d13687ecea3a42a2b0b563e2b45dfaa2.zip
FreeBSD-src-d5a33e59d13687ecea3a42a2b0b563e2b45dfaa2.tar.gz
Cleanup the clock code. This includes:
o Remove alpha specific timer code (mc146818A) and compiled-out calibration of said timer. o Remove i386 inherited timer code (i8253) and related acquire and release functions. o Move sysbeep() from clock.c to machdep.c and have it return ENODEV. Console beeps should be implemented using ACPI or if no such device is described, using the sound driver. o Move the sysctls related to adjkerntz, disable_rtc_set and wall_cmos_clock from machdep.c to clock.c, where the variables are. o Don't hardcode a hz value of 1024 in cpu_initclocks() and don't bother faking a stathz that's 1/8 of that. Keep it simple: hz defaults to HZ and stathz equals hz. This is also how it's done for sparc64. o Keep a per-CPU ITC counter (pc_clock) and adjustment (pc_clockadj) to calculate ITC skew and corrections. On average, we adjust the ITC match register once every ~1500 interrupts for a duration of 2 consequtive interruprs. This is to correct the non-deterministic behaviour of the ITC interrupt (there's a delay between the match and the raising of the interrupt). o Add 4 debugging sysctls to monitor clock behaviour. Those are debug.clock_adjust_edges, debug.clock_adjust_excess, debug.clock_adjust_lost and debug.clock_adjust_ticks. The first counts the individual adjustment cycles (when the skew first crosses the threshold), the second counts the number of times the adjustment was excessive (any non-zero value is to be considered a bug), the third counts lost clock interrupts and the last counts the number of interrupts for which we applied an adjustment (debug.clock_adjust_ticks / debug.clock_adjust_edges gives the avarage duration of an individual adjustment -- should be ~2). While here, remove some nearby (trivial) left-overs from alpha and other cleanups.
Diffstat (limited to 'sys/ia64/include/clock.h')
-rw-r--r--sys/ia64/include/clock.h14
1 files changed, 6 insertions, 8 deletions
diff --git a/sys/ia64/include/clock.h b/sys/ia64/include/clock.h
index 41e3bf6..ef76769 100644
--- a/sys/ia64/include/clock.h
+++ b/sys/ia64/include/clock.h
@@ -13,16 +13,14 @@
#define CLOCK_VECTOR 254
-extern int disable_rtc_set;
-extern int wall_cmos_clock;
-extern int adjkerntz;
+extern int adjkerntz;
+extern int disable_rtc_set;
+extern int wall_cmos_clock;
-extern u_int64_t itc_frequency;
-extern u_int64_t itm_reload;
+extern uint64_t ia64_clock_reload;
+extern uint64_t itc_frequency;
-int sysbeep(int pitch, int period);
-int acquire_timer2(int mode);
-int release_timer2(void);
+int sysbeep(int pitch, int period);
#endif
OpenPOWER on IntegriCloud