diff options
author | grehan <grehan@FreeBSD.org> | 2007-11-13 15:47:55 +0000 |
---|---|---|
committer | grehan <grehan@FreeBSD.org> | 2007-11-13 15:47:55 +0000 |
commit | 243c15922e80e6b88947bd58974b7e7c3e74414c (patch) | |
tree | afa6afcdacc1a084ce4732b6de8c442040e954b1 /sys/powerpc/aim/clock.c | |
parent | f026c7be9448bfb99bf9a7551e922faa58801f56 (diff) | |
download | FreeBSD-src-243c15922e80e6b88947bd58974b7e7c3e74414c.zip FreeBSD-src-243c15922e80e6b88947bd58974b7e7c3e74414c.tar.gz |
Split decr_init() into two, with the section that reads the timebase
frequency from OpenFirmware moved out and into a routine that is called
from cpu_startup().
This allows correct reporting of the CPU clockspeed when printing out
CPU information at boot time.
Reported by: numerous
Reviewed by: marcel
MFC after: 1 day
Diffstat (limited to 'sys/powerpc/aim/clock.c')
-rw-r--r-- | sys/powerpc/aim/clock.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/powerpc/aim/clock.c b/sys/powerpc/aim/clock.c index 4b03d36..0c01cf0 100644 --- a/sys/powerpc/aim/clock.c +++ b/sys/powerpc/aim/clock.c @@ -233,9 +233,6 @@ decr_init(void) msr = mfmsr(); mtmsr(msr & ~(PSL_EE|PSL_RI)); - decr_timecounter.tc_frequency = ticks_per_sec; - tc_init(&decr_timecounter); - ns_per_tick = 1000000000 / ticks_per_sec; ticks_per_intr = ticks_per_sec / hz; __asm __volatile ("mftb %0" : "=r"(lasttb)); @@ -257,6 +254,13 @@ decr_init(void) panic("no cpu node"); } +void +decr_tc_init(void) +{ + decr_timecounter.tc_frequency = ticks_per_sec; + tc_init(&decr_timecounter); +} + static __inline u_quad_t mftb(void) { |