x86, mce: don't init timer if !mce_available
authorHidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Mon, 15 Jun 2009 08:18:45 +0000 (17:18 +0900)
committerH. Peter Anvin <hpa@zytor.com>
Tue, 16 Jun 2009 23:56:04 +0000 (16:56 -0700)
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>
arch/x86/kernel/cpu/mcheck/mce.c

index 19294b8..dda7721 100644 (file)
@@ -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();
 }