Skip to contentSkip to conversation

clear IOCK NMI before panic

PATCH New Naohiro Ooiwa 1 participant 1 message Feb 15, 2013 1 message not in the archive x86

lore
Share & tools
lore

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

#1 lore raw

PATCH 1/1 clear IOCK NMI before panic

Hi all

I tried to push an NMI button on HP DL380p Gen8's iLO4.
and then I received an IOCK NMI error.
When panic_on_io_nmi is set to 0, it seems that IOCK NMI error is sent repeatedly.

In case of panic_on_io_nmi=1 and kdump is available, the second kernel started. But IOCK NMI is sent repeatedly and second kernel couldn't take a dump.

Though this is just my guess,
We should clear the IOCK of NMI reason before panic().

I tried to create a patch, which works for me.
Is my patch reasonable?

Thanks you.
Naohiro Ooiwa

---
 arch/x86/kernel/nmi.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
arch/x86/kernel/nmi.c +4 -1
index f84f5c5..c3cbfbe 100644
@@ -209,8 +209,11 @@ io_check_error(unsigned char reason, struct pt_regs *regs)
 		 reason, smp_processor_id());
 	show_regs(regs);
 
-	if (panic_on_io_nmi)
+	if (panic_on_io_nmi) {
+		reason = (reason & NMI_REASON_CLEAR_MASK) | NMI_REASON_CLEAR_IOCHK;
+		outb(reason, NMI_REASON_PORT);
 		panic("NMI IOCK error: Not continuing");
+	}
 
 	/* Re-enable the IOCK line, wait for a few seconds */
 	reason = (reason & NMI_REASON_CLEAR_MASK) | NMI_REASON_CLEAR_IOCHK;
Signature · 1 line
1.7.10.4