Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Suchanek <msuchanek@suse.de>2018-07-10 19:05:44 +0200
committerMichal Suchanek <msuchanek@suse.de>2018-07-10 19:05:48 +0200
commit14329282dcddbf7c4473b86a82cfc12ba7b57643 (patch)
tree67e93d7d5adb06db633f9f4b6a50740d4de37dee
parent41a23c68f09328762a39b2a130c6a21632d588aa (diff)
powerpc: Machine check interrupt is a non-maskable interrupt
(bsc#1094244).
-rw-r--r--patches.arch/powerpc-Machine-check-interrupt-is-a-non-maskable-in.patch53
-rw-r--r--series.conf1
2 files changed, 54 insertions, 0 deletions
diff --git a/patches.arch/powerpc-Machine-check-interrupt-is-a-non-maskable-in.patch b/patches.arch/powerpc-Machine-check-interrupt-is-a-non-maskable-in.patch
new file mode 100644
index 0000000000..a1a085e9b9
--- /dev/null
+++ b/patches.arch/powerpc-Machine-check-interrupt-is-a-non-maskable-in.patch
@@ -0,0 +1,53 @@
+From b96672dd840f2231c3e0804842d380c401739733 Mon Sep 17 00:00:00 2001
+From: Nicholas Piggin <npiggin@gmail.com>
+Date: Wed, 19 Jul 2017 16:59:12 +1000
+Subject: [PATCH] powerpc: Machine check interrupt is a non-maskable interrupt
+
+References: bsc#1094244
+Patch-mainline: v4.14-rc1
+Git-commit: b96672dd840f2231c3e0804842d380c401739733
+
+Use nmi_enter similarly to system reset interrupts. This uses NMI
+printk NMI buffers and turns off various debugging facilities that
+helps avoid tripping on ourselves or other CPUs.
+
+Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
+Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
+Acked-by: Michal Suchanek <msuchanek@suse.de>
+---
+ arch/powerpc/kernel/traps.c | 9 ++++++---
+ 1 file changed, 6 insertions(+), 3 deletions(-)
+
+diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
+index 6858d910b47e..ec74e203ee04 100644
+--- a/arch/powerpc/kernel/traps.c
++++ b/arch/powerpc/kernel/traps.c
+@@ -644,8 +644,10 @@ int machine_check_generic(struct pt_regs *regs)
+
+ void machine_check_exception(struct pt_regs *regs)
+ {
+- enum ctx_state prev_state = exception_enter();
+ int recover = 0;
++ bool nested = in_nmi();
++ if (!nested)
++ nmi_enter();
+
+ /* 64s accounts the mce in machine_check_early when in HVMODE */
+ if (!IS_ENABLED(CONFIG_PPC_BOOK3S_64) || !cpu_has_feature(CPU_FTR_HVMODE))
+@@ -677,10 +679,11 @@ void machine_check_exception(struct pt_regs *regs)
+
+ /* Must die if the interrupt is not recoverable */
+ if (!(regs->msr & MSR_RI))
+- panic("Unrecoverable Machine check");
++ nmi_panic(regs, "Unrecoverable Machine check");
+
+ bail:
+- exception_exit(prev_state);
++ if (!nested)
++ nmi_exit();
+ }
+
+ void SMIException(struct pt_regs *regs)
+--
+2.13.7
+
diff --git a/series.conf b/series.conf
index 19892b08bc..527ea4ebbb 100644
--- a/series.conf
+++ b/series.conf
@@ -4613,6 +4613,7 @@
# bsc#1094244
patches.arch/powerpc-64s-Fix-mce-accounting-for-powernv.patch
+ patches.arch/powerpc-Machine-check-interrupt-is-a-non-maskable-in.patch
########################################################
# powerpc/little endian