diff options
author | Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com> | 2009-06-15 10:18:45 +0200 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2009-06-17 01:56:04 +0200 |
commit | 33edbf02a92771fa2a81e41084a44ba874e3a5a5 (patch) | |
tree | 1b785cc0119685e59f5cbc763834f64a8ad28357 /arch/x86 | |
parent | x86, mce: fix a race condition about mce_callin and no_way_out (diff) | |
download | linux-33edbf02a92771fa2a81e41084a44ba874e3a5a5.tar.xz linux-33edbf02a92771fa2a81e41084a44ba874e3a5a5.zip |
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>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/kernel/cpu/mcheck/mce.c | 5 |
1 files changed, 3 insertions, 2 deletions
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(); } |