From: Hidetoshi Seto Date: Mon, 15 Jun 2009 08:18:45 +0000 (+0900) Subject: x86, mce: don't init timer if !mce_available X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=33edbf02a92771fa2a81e41084a44ba874e3a5a5;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git 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 Signed-off-by: H. Peter Anvin --- diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c index 19294b8524cb..dda77215e9e2 100644 --- a/arch/x86/kernel/cpu/mcheck/mce.c +++ b/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(¤t_cpu_data)) - mce_init(); + if (!mce_available(¤t_cpu_data)) + return; + mce_init(); mce_init_timer(); }