diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2008-05-18 22:17:59 +0200 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2008-05-23 14:08:06 +0200 |
commit | 74dc51a3de06aa516e3b9fdc4017b2aeb38bf44b (patch) | |
tree | 85754dadbcbbf5d08dc39907abcf482a0b154324 /arch/x86/kernel/tsc_32.c | |
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/kernel/tsc_32.c')
-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) 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; } |