x86: Check tsc available/disabled in the delayed init function
A message that is not in the archive (sent off-list or not yet received): [email protected]
john stultz
Acked-byQuoted 14 lines · tip-bot for Thomas Gleixner
Commit-ID: a8760eca6cf60ed303ad494ef45901f63165d2c8 Gitweb: http://git.kernel.org/tip/a8760eca6cf60ed303ad494ef45901f63165d2c8 Author: Thomas Gleixner <[email protected]> AuthorDate: Mon, 13 Dec 2010 11:28:02 +0100 Committer: Thomas Gleixner <[email protected]> CommitDate: Mon, 13 Dec 2010 11:35:05 +0100x86: 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.
Quoted 5 lines
Add the missing checks and do not touch TSC when not available or disabled.
Signed-off-by Thomas Gleixner <[email protected]>Cc John Stultz <[email protected]>
Thanks for catching this!
Acked-by John Stultz <[email protected]>
Quoted 18 lines
--- arch/x86/kernel/tsc.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)arch/x86/kernel/tsc.c +3
-0@@ -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: */