summaryrefslogtreecommitdiffstats
path: root/arch/x86_64/kernel/mce.c
diff options
context:
space:
mode:
authorAndi Kleen <ak@suse.de>2006-04-07 19:49:57 +0200
committerLinus Torvalds <torvalds@g5.osdl.org>2006-04-09 11:53:52 -0700
commit553f265fe883a23502ee351845f09334790f18b8 (patch)
tree1fd60e72d7d5cbed34812eb6763899d2bd37c152 /arch/x86_64/kernel/mce.c
parentbe56db6186999a8571ae480cf2b929578f6dfd68 (diff)
downloadop-kernel-dev-553f265fe883a23502ee351845f09334790f18b8.zip
op-kernel-dev-553f265fe883a23502ee351845f09334790f18b8.tar.gz
[PATCH] x86_64: Don't run NMI watchdog during machine checks
Machine checks can stall the machine for a long time and it's not good to trigger the nmi watchdog during that. Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/x86_64/kernel/mce.c')
-rw-r--r--arch/x86_64/kernel/mce.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/x86_64/kernel/mce.c b/arch/x86_64/kernel/mce.c
index 10b3e34..6f0790e 100644
--- a/arch/x86_64/kernel/mce.c
+++ b/arch/x86_64/kernel/mce.c
@@ -29,6 +29,8 @@
#define MISC_MCELOG_MINOR 227
#define NR_BANKS 6
+atomic_t mce_entry;
+
static int mce_dont_init;
/* 0: always panic, 1: panic if deadlock possible, 2: try to avoid panic,
@@ -172,10 +174,12 @@ void do_machine_check(struct pt_regs * regs, long error_code)
int i;
int panicm_found = 0;
+ atomic_inc(&mce_entry);
+
if (regs)
notify_die(DIE_NMI, "machine check", regs, error_code, 18, SIGKILL);
if (!banks)
- return;
+ goto out2;
memset(&m, 0, sizeof(struct mce));
m.cpu = safe_smp_processor_id();
@@ -266,6 +270,8 @@ void do_machine_check(struct pt_regs * regs, long error_code)
out:
/* Last thing done in the machine check exception to clear state. */
wrmsrl(MSR_IA32_MCG_STATUS, 0);
+ out2:
+ atomic_dec(&mce_entry);
}
/*
OpenPOWER on IntegriCloud