projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9ccc906
)
x86: disable TSC for sched_clock() when calibration failed
author
Thomas Gleixner
<tglx@linutronix.de>
Sun, 18 May 2008 20:17:59 +0000
(22:17 +0200)
committer
Thomas Gleixner
<tglx@linutronix.de>
Fri, 23 May 2008 12:08:06 +0000
(14:08 +0200)
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
arch/x86/kernel/tsc_32.c
patch
|
blob
|
history
diff --git
a/arch/x86/kernel/tsc_32.c
b/arch/x86/kernel/tsc_32.c
index b087d691f165842836fe362b65c361f57669841e..068759db63ddebca0ed5561a1306a302dc38f474 100644
(file)
--- 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;
}