Skip to contentSkip to conversation

x86: Allow users to force a panic on NMI

PATCH Andrew Morton 2 participants 2 messages Sep 26, 2006 – Sep 27, 2006 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

kernel/panic.c #include <linux/kexec.h> · line 27

Quoted 10 lines · On Tue, 26 Sep 2006 22:59:59 GMT Linux Kernel Mailing List…
kernel/panic.c +1 -0
@@ -21,6 +21,7 @@ #include <linux/kexec.h>
 #include <linux/debug_locks.h>
 
 int panic_on_oops;
+int panic_on_unrecovered_nmi;
 int tainted;
 static int pause_on_oops;
 static int pause_on_oops_flag;

Is visible to all architectures.

Quoted 6 lines
kernel/sysctl.c +0 -0
index 040de6b..220e205 100644
@@ -642,6 +642,14 @@ #if defined(CONFIG_X86_LOCAL_APIC) && de
 #endif

kernel/sysctl.c #if defined(CONFIG_X86_LOCAL_APIC) && de · line 652

Quoted 10 lines
kernel/sysctl.c +8 -0
 #if defined(CONFIG_X86)
 	{
+		.ctl_name	= KERN_PANIC_ON_NMI,
+		.procname	= "panic_on_unrecovered_nmi",
+		.data		= &panic_on_unrecovered_nmi,
+		.maxlen		= sizeof(int),
+		.mode		= 0644,
+		.proc_handler	= &proc_dointvec,
+	},
+	{

But is x86-only.

#2 lore raw
Quoted 8 lines · Andrew Morton
Quoted 5 lines · On Tue, 26 Sep 2006 22:59:59 GMT Linux Kernel Mailing List…
kernel/panic.c +0 -0
@@ -21,6 +21,7 @@ #include <linux/kexec.h>
 #include <linux/debug_locks.h>
 
Quoted 7 lines

kernel/panic.c #include <linux/kexec.h> · line 27

Quoted 5 lines
kernel/panic.c +1 -0
 int panic_on_oops;
+int panic_on_unrecovered_nmi;
 int tainted;
 static int pause_on_oops;
 static int pause_on_oops_flag;

Is visible to all architectures.

Ok, adding a #ifdef

-Andi