Skip to contentSkip to conversation

x86: Add unknown_nmi_panic kernel parameter

PATCH Applied Simon Arlott 2 participants 2 messages Jul 19, 2008 – Jul 20, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86: Add unknown_nmi_panic kernel parameter

It's not possible to enable the unknown_nmi_panic sysctl option until init is run. It's useful to be able to panic the kernel during boot too, this adds a parameter to enable this option.

---

Documentation/kernel-parameters.txt |    4 ++++
arch/x86/kernel/nmi.c               |    7 +++++++
2 files changed, 11 insertions(+), 0 deletions(-)
Documentation/kernel-parameters.txt +0 -0
index 09ad745..06fbb3a 100644
@@ -2158,6 +2158,10 @@ and is between 256 and 4096 characters. It is defined in the file

Note that genuine overcurrent events won't be reported either.

+ unknown_nmi_panic
+ [X86-32,X86-64]
+ Set unknown_nmi_panic=1 early on boot.
+
usbcore.autosuspend=
[USB] The autosuspend time delay (in seconds) used for newly-detected USB devices (default 2). This

arch/x86/kernel/nmi.c +0 -0
index ec024b3..e0b44b7 100644
@@ -448,6 +448,13 @@ nmi_watchdog_tick(struct pt_regs *regs, unsigned reason)
 

#ifdef CONFIG_SYSCTL

+static int __init setup_unknown_nmi_panic(char *str)
+{
+ unknown_nmi_panic = 1;
+ return 1;
+}
+__setup("unknown_nmi_panic", setup_unknown_nmi_panic);
+
static int unknown_nmi_panic_callback(struct pt_regs *regs, int cpu)

{
	unsigned char reason = get_nmi_reason();
Signature · 4 lines
1.5.6.2

-- 
Simon Arlott
Applied
#1 lore raw
Quoted 5 lines · Simon Arlott

It's not possible to enable the unknown_nmi_panic sysctl option until init is run. It's useful to be able to panic the kernel during boot too, this adds a parameter to enable this option.

applied to tip/x86/nmi, thanks Simon.

Ingo