diff options
author | marcel <marcel@FreeBSD.org> | 2003-08-04 05:13:18 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2003-08-04 05:13:18 +0000 |
commit | d5a33e59d13687ecea3a42a2b0b563e2b45dfaa2 (patch) | |
tree | 53c0285dd78b50088e45353c7f9f616322b81ed4 /sys/ia64/include/cpu.h | |
parent | 321771d2627fb7dfe7408a8f7a6bc6dd85ddac97 (diff) | |
download | FreeBSD-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/cpu.h')
-rw-r--r-- | sys/ia64/include/cpu.h | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/sys/ia64/include/cpu.h b/sys/ia64/include/cpu.h index da64afe..e31968d 100644 --- a/sys/ia64/include/cpu.h +++ b/sys/ia64/include/cpu.h @@ -75,18 +75,14 @@ struct clockframe { * CTL_MACHDEP definitions. */ #define CPU_CONSDEV 1 /* dev_t: console terminal device */ -#define CPU_ROOT_DEVICE 2 /* string: root device name */ -#define CPU_BOOTED_KERNEL 3 /* string: booted kernel name */ -#define CPU_ADJKERNTZ 4 /* int: timezone offset (seconds) */ -#define CPU_DISRTCSET 5 /* int: disable resettodr() call */ -#define CPU_WALLCLOCK 6 /* int: indicates wall CMOS clock */ -#define CPU_MAXID 7 /* valid machdep IDs */ +#define CPU_ADJKERNTZ 2 /* int: timezone offset (seconds) */ +#define CPU_DISRTCSET 3 /* int: disable resettodr() call */ +#define CPU_WALLCLOCK 4 /* int: indicates wall CMOS clock */ +#define CPU_MAXID 5 /* valid machdep IDs */ #define CTL_MACHDEP_NAMES { \ { 0, 0 }, \ { "console_device", CTLTYPE_STRUCT }, \ - { "root_device", CTLTYPE_STRING }, \ - { "booted_kernel", CTLTYPE_STRING }, \ { "adjkerntz", CTLTYPE_INT }, \ { "disable_rtc_set", CTLTYPE_INT }, \ { "wall_cmos_clock", CTLTYPE_INT }, \ @@ -100,11 +96,6 @@ struct reg; struct rpb; struct trapframe; -extern struct rpb *hwrpb; -extern volatile int mc_expected, mc_received; - -int badaddr(void *, size_t); -int badaddr_read(void *, size_t, void *); u_int64_t console_restart(u_int64_t, u_int64_t, u_int64_t); int do_ast(struct trapframe *); void dumpconf(void); @@ -118,8 +109,6 @@ void init_prom_interface(struct rpb*); void interrupt(u_int64_t, struct trapframe *); void machine_check(unsigned long, struct trapframe *, unsigned long, unsigned long); -u_int64_t hwrpb_checksum(void); -void hwrpb_restart_setup(void); void regdump(struct trapframe *); void regtoframe(struct reg *, struct trapframe *); void set_iointr(void (*)(void *, unsigned long)); |