diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2008-05-18 16:17:59 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2008-05-23 08:08:06 -0400 |
commit | 74dc51a3de06aa516e3b9fdc4017b2aeb38bf44b (patch) | |
tree | 85754dadbcbbf5d08dc39907abcf482a0b154324 /arch/x86 | |
parent | 9ccc906c97e34fd91dc6aaf5b69b52d824386910 (diff) |
x86: disable TSC for sched_clock() when calibration failed
When the TSC calibration fails then TSC is still used in
sched_clock(). Disable it completely in that case.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: stable@kernel.org
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/kernel/tsc_32.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/x86/kernel/tsc_32.c b/arch/x86/kernel/tsc_32.c index b087d691f165..068759db63dd 100644 --- a/arch/x86/kernel/tsc_32.c +++ b/arch/x86/kernel/tsc_32.c | |||
@@ -413,6 +413,11 @@ void __init tsc_init(void) | |||
413 | 413 | ||
414 | if (!cpu_khz) { | 414 | if (!cpu_khz) { |
415 | mark_tsc_unstable("could not calculate TSC khz"); | 415 | mark_tsc_unstable("could not calculate TSC khz"); |
416 | /* | ||
417 | * We need to disable the TSC completely in this case | ||
418 | * to prevent sched_clock() from using it. | ||
419 | */ | ||
420 | tsc_disabled = 1; | ||
416 | return; | 421 | return; |
417 | } | 422 | } |
418 | 423 | ||