aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2008-05-24 17:40:17 +0000
committerChris Wright <chrisw@sous-sol.org>2008-06-09 11:27:02 -0700
commit6bdb15cddf9d758c825cf28678d1f903104d2134 (patch)
tree28a6160d3096a202b196410257e6d3f2a27d1112 /arch
parent94aa6550e8668fab1997e2d57a48b22cf68090b2 (diff)
x86: disable TSC for sched_clock() when calibration failed
upstream commit: 74dc51a3de06aa516e3b9fdc4017b2aeb38bf44b 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 Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Diffstat (limited to 'arch')
-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 021723ccd50..01e4f8b2624 100644
--- a/arch/x86/kernel/tsc_32.c
+++ b/arch/x86/kernel/tsc_32.c
@@ -401,6 +401,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;
}