1
0
Fork 0

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>
hifive-unleashed-5.1
Hidetoshi Seto 2009-06-15 17:18:45 +09:00 committed by H. Peter Anvin
parent 184e1fdfea
commit 33edbf02a9
1 changed files with 3 additions and 2 deletions

View 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();
}