]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
x86: tsc: Prevent delayed init if initial tsc calibration failed
authorThomas Gleixner <tglx@linutronix.de>
Tue, 11 Jan 2011 10:40:48 +0000 (11:40 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 11 Jan 2011 10:48:39 +0000 (11:48 +0100)
commit a8760ec (x86: Check tsc available/disabled in the delayed init
function) missed to prevent the setup of the delayed init function in
case the initial tsc calibration failed. This results in the same
divide by zero bug as we have seen without the tsc disabled check.

Skip the delayed work setup when tsc_khz (the initial calibration
value) is 0.

Bisected-and-tested-by: Kirill A. Shutemov <kas@openvz.org>
Cc: John Stultz <john.stultz@linaro.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
arch/x86/kernel/tsc.c

index 356a0d455cf997cb1bd586d3a13fd8a7c16d4d3c..463901efdba4c9a279ab2f1cb0af6ad947476a2f 100644 (file)
@@ -965,7 +965,7 @@ out:
 
 static int __init init_tsc_clocksource(void)
 {
-       if (!cpu_has_tsc || tsc_disabled > 0)
+       if (!cpu_has_tsc || tsc_disabled > 0 || !tsc_khz)
                return 0;
 
        if (tsc_clocksource_reliable)