diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2010-12-13 11:28:02 +0100 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2010-12-13 11:35:05 +0100 |
commit | a8760eca6cf60ed303ad494ef45901f63165d2c8 (patch) | |
tree | dcf5a97a3175c7fa109aedf22185e5436bb621e5 /arch/x86 | |
parent | 08ec0c58fb8a05d3191d5cb6f5d6f81adb419798 (diff) | |
download | op-kernel-dev-a8760eca6cf60ed303ad494ef45901f63165d2c8.zip op-kernel-dev-a8760eca6cf60ed303ad494ef45901f63165d2c8.tar.gz |
x86: Check tsc available/disabled in the delayed init function
The delayed TSC init function does not check whether the system has no
TSC or TSC is disabled at the kernel command line, which results in a
crash in the work queue based extended calibration due to division by
zero because the basic calibration never happened.
Add the missing checks and do not touch TSC when not available or
disabled.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: John Stultz <johnstul@us.ibm.com>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/kernel/tsc.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c index dc1393e..356a0d4 100644 --- a/arch/x86/kernel/tsc.c +++ b/arch/x86/kernel/tsc.c @@ -965,6 +965,9 @@ out: static int __init init_tsc_clocksource(void) { + if (!cpu_has_tsc || tsc_disabled > 0) + return 0; + if (tsc_clocksource_reliable) clocksource_tsc.flags &= ~CLOCK_SOURCE_MUST_VERIFY; /* lower the rating if we already know its unstable: */ |