diff options
author | phk <phk@FreeBSD.org> | 2003-08-06 15:05:27 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2003-08-06 15:05:27 +0000 |
commit | 3bd92bdf0a09944e38a66bf2c6144288e2685397 (patch) | |
tree | e0ebdd84c6486e83f90cbff5a1156df91970b418 /sys/i386 | |
parent | 66a0a36c3cb45e7d3cea6233f4378bc1d38100c9 (diff) | |
download | FreeBSD-src-3bd92bdf0a09944e38a66bf2c6144288e2685397.zip FreeBSD-src-3bd92bdf0a09944e38a66bf2c6144288e2685397.tar.gz |
Dont initialize a TSC timecounter until we know if it is broken or not.
Diffstat (limited to 'sys/i386')
-rw-r--r-- | sys/i386/i386/tsc.c | 6 | ||||
-rw-r--r-- | sys/i386/include/clock.h | 1 | ||||
-rw-r--r-- | sys/i386/isa/clock.c | 1 |
3 files changed, 8 insertions, 0 deletions
diff --git a/sys/i386/i386/tsc.c b/sys/i386/i386/tsc.c index a2e7f6a..4dc1861 100644 --- a/sys/i386/i386/tsc.c +++ b/sys/i386/i386/tsc.c @@ -99,7 +99,13 @@ init_TSC(void) if (mp_ncpus > 1 && !smp_tsc) return; #endif + return; +} + +void +init_TSC_tc(void) +{ /* * We can not use the TSC if we support APM. Precise timekeeping * on an APM'ed machine is at best a fools pursuit, since diff --git a/sys/i386/include/clock.h b/sys/i386/include/clock.h index 5ae4fb2..74625c6 100644 --- a/sys/i386/include/clock.h +++ b/sys/i386/include/clock.h @@ -46,6 +46,7 @@ int release_timer1(void); int sysbeep(int pitch, int period); void timer_restore(void); void init_TSC(void); +void init_TSC_tc(void); #endif /* _KERNEL */ diff --git a/sys/i386/isa/clock.c b/sys/i386/isa/clock.c index 42888aa..73c2fa4 100644 --- a/sys/i386/isa/clock.c +++ b/sys/i386/isa/clock.c @@ -1057,6 +1057,7 @@ cpu_initclocks() "routing 8254 via 8259 and IOAPIC #0 intpin 0\n"); #endif + init_TSC_tc(); } #ifdef APIC_IO |