Suspend 2 merge: 17/51: Disable MCE checking during suspend.

Nigel Cunningham
2004-11-24T13:10:54Z

Avoid a potential SMP deadlock here.

diff -ruN 506-disable-mce-checking-during-suspend-avoid-smp-deadlock-old/arch/i386/kernel/cpu/mcheck/non-fatal.c 506-disable-mce-checking-during-suspend-avoid-smp-deadlock-new/arch/i386/kernel/cpu/mcheck/non-fatal.c
--- 506-disable-mce-checking-during-suspend-avoid-smp-deadlock-old/arch/i386/kernel/cpu/mcheck/non-fatal.c 2004-11-03 21:51:31.000000000 +1100
+++ 506-disable-mce-checking-during-suspend-avoid-smp-deadlock-new/arch/i386/kernel/cpu/mcheck/non-fatal.c 2004-11-04 16:27:40.000000000 +1100
@@ -17,6 +17,7 @@
#include <linux/interrupt.h>
#include <linux/smp.h>
#include <linux/module.h>
+#include <linux/suspend.h>

#include <asm/processor.h>
#include <asm/system.h>
@@ -57,7 +58,8 @@

static void mce_work_fn(void *data)
{
- on_each_cpu(mce_checkregs, NULL, 1, 1);
+ if (!test_suspend_state(SUSPEND_RUNNING))
+ on_each_cpu(mce_checkregs, NULL, 1, 1);
schedule_delayed_work(&mce_work, MCE_RATE);
}