提交 29fe359c 编写于 作者: T Thomas Gleixner

x86: tsc: Prevent delayed init if initial tsc calibration failed

commit a8760eca (x86: Check tsc available/disabled in the delayed init
function) missed to prevent the setup of the delayed init function in
case the initial tsc calibration failed. This results in the same
divide by zero bug as we have seen without the tsc disabled check.

Skip the delayed work setup when tsc_khz (the initial calibration
value) is 0.
Bisected-and-tested-by: NKirill A. Shutemov <kas@openvz.org>
Cc: John Stultz <john.stultz@linaro.org>
Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
上级 4aed89d6
...@@ -965,7 +965,7 @@ static void tsc_refine_calibration_work(struct work_struct *work) ...@@ -965,7 +965,7 @@ static void tsc_refine_calibration_work(struct work_struct *work)
static int __init init_tsc_clocksource(void) static int __init init_tsc_clocksource(void)
{ {
if (!cpu_has_tsc || tsc_disabled > 0) if (!cpu_has_tsc || tsc_disabled > 0 || !tsc_khz)
return 0; return 0;
if (tsc_clocksource_reliable) if (tsc_clocksource_reliable)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册