From 36fe9fb493ad9b28c42a7b1610c704856e07467c Mon Sep 17 00:00:00 2001 From: phk Date: Wed, 29 Jan 2003 11:36:39 +0000 Subject: Make tsc_freq a 64bit quantity. Inspired by: http://www.theinquirer.net/?article=7481 --- sys/isa/atrtc.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'sys/isa/atrtc.c') diff --git a/sys/isa/atrtc.c b/sys/isa/atrtc.c index 140f6bc..98ef6f78 100644 --- a/sys/isa/atrtc.c +++ b/sys/isa/atrtc.c @@ -53,6 +53,7 @@ #include "opt_mca.h" #include +#include #include #include #include @@ -135,7 +136,7 @@ int statclock_disable; #endif u_int timer_freq = TIMER_FREQ; int timer0_max_count; -u_int tsc_freq; +uint64_t tsc_freq; int tsc_is_broken; u_int tsc_present; int wall_cmos_clock; /* wall CMOS clock assumed if != 0 */ @@ -663,7 +664,7 @@ calibrate_clocks(void) if (bootverbose) { if (tsc_present) - printf("TSC clock: %u Hz, ", tsc_freq); + printf("TSC clock: %ju Hz, ", (intmax_t)tsc_freq); printf("i8254 clock: %u Hz\n", tot_count); } return (tot_count); @@ -803,7 +804,8 @@ startrtclock() tsc_freq = rdtsc() - old_tsc; #ifdef CLK_USE_TSC_CALIBRATION if (bootverbose) - printf("TSC clock: %u Hz (Method B)\n", tsc_freq); + printf("TSC clock: %ju Hz (Method B)\n", + (intmax_t)tsc_freq); #endif } @@ -1204,7 +1206,7 @@ static int sysctl_machdep_tsc_freq(SYSCTL_HANDLER_ARGS) { int error; - u_int freq; + uint64_t freq; if (tsc_timecounter.tc_frequency == 0) return (EOPNOTSUPP); @@ -1217,7 +1219,7 @@ sysctl_machdep_tsc_freq(SYSCTL_HANDLER_ARGS) return (error); } -SYSCTL_PROC(_machdep, OID_AUTO, tsc_freq, CTLTYPE_INT | CTLFLAG_RW, +SYSCTL_PROC(_machdep, OID_AUTO, tsc_freq, CTLTYPE_QUAD | CTLFLAG_RW, 0, sizeof(u_int), sysctl_machdep_tsc_freq, "IU", ""); static unsigned -- cgit v1.1