Explorar el Código

x86, mce: don't init timer if !mce_available

In mce_cpu_restart, mce_init_timer is called unconditionally.
If !mce_available (e.g. mce is disabled), there are no useful work
for timer.  Stop running it.

Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Hidetoshi Seto hace 16 años
padre
commit
33edbf02a9
Se han modificado 1 ficheros con 3 adiciones y 2 borrados
  1. 3 2
      arch/x86/kernel/cpu/mcheck/mce.c

+ 3 - 2
arch/x86/kernel/cpu/mcheck/mce.c

@@ -1617,8 +1617,9 @@ static int mce_resume(struct sys_device *dev)
 static void mce_cpu_restart(void *data)
 {
 	del_timer_sync(&__get_cpu_var(mce_timer));
-	if (mce_available(&current_cpu_data))
-		mce_init();
+	if (!mce_available(&current_cpu_data))
+		return;
+	mce_init();
 	mce_init_timer();
 }