x86: fix setup of cyc2ns in tsc_64.c
authorThomas Gleixner <tglx@linutronix.de>
Sat, 24 May 2008 17:40:18 +0000 (17:40 +0000)
committerChris Wright <chrisw@sous-sol.org>
Mon, 9 Jun 2008 18:27:02 +0000 (11:27 -0700)
commit611a6f01f6cf797604dea042a0b64a868fd3170b
tree33bb5f77f8b6c8cb8121e0ce644685017d0cff1c
parentfdeb373e553c6feedfba6ffd005f837b5fef3622
x86: fix setup of cyc2ns in tsc_64.c

upstream commit: b6db80ee1331e7beaeb91b4b3d946dd16c72e388

When the TSC is calibrated against the PIT due to the nonavailability
of PMTIMER/HPET or due to SMI interference then the setup of the per
CPU cyc2ns variables is skipped. This is unlikely to happen but it
would definitely render sched_clock() unusable.

This was introduced with commit 53d517cdbaac704352b3d0c10fecb99e0b54572e

    x86: scale cyc_2_nsec according to CPU frequency

Update the per CPU cyc2ns variables in all exit pathes of tsc_calibrate.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: stable@kernel.org
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
arch/x86/kernel/tsc_64.c