aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/kernel
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2008-05-18 22:17:59 +0200
committerThomas Gleixner <tglx@linutronix.de>2008-05-23 14:08:06 +0200
commit74dc51a3de06aa516e3b9fdc4017b2aeb38bf44b (patch)
tree85754dadbcbbf5d08dc39907abcf482a0b154324 /arch/x86/kernel
parent9ccc906c97e34fd91dc6aaf5b69b52d824386910 (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/kernel')
-rw-r--r--arch/x86/kernel/tsc_32.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/x86/kernel/tsc_32.c b/arch/x86/kernel/tsc_32.c
index b087d691f16..068759db63d 100644
--- a/arch/x86/kernel/tsc_32.c
+++ b/arch/x86/kernel/tsc_32.c
@@ -413,6 +413,11 @@ void __init tsc_init(void)
if (!cpu_khz) {
mark_tsc_unstable("could not calculate TSC khz");
+ /*
+ * We need to disable the TSC completely in this case
+ * to prevent sched_clock() from using it.
+ */
+ tsc_disabled = 1;
return;
}