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
commit41a23c68f09328762a39b2a130c6a21632d588aa (patch)
treeb30ba00a9c1aa7b98618156ef78fc67621f7331a
parent95249dfa120850f8050a6bd01ce7b99081de9e87 (diff)
powerpc/64s: Fix mce accounting for powernv (bsc#1094244).
-rw-r--r--patches.arch/powerpc-64s-Fix-mce-accounting-for-powernv.patch38
-rw-r--r--series.conf3
2 files changed, 41 insertions, 0 deletions
diff --git a/patches.arch/powerpc-64s-Fix-mce-accounting-for-powernv.patch b/patches.arch/powerpc-64s-Fix-mce-accounting-for-powernv.patch
new file mode 100644
index 0000000000..c3116e5e94
--- /dev/null
+++ b/patches.arch/powerpc-64s-Fix-mce-accounting-for-powernv.patch
@@ -0,0 +1,38 @@
+From f886f0f6e0e20d53dc36421c2ee83fb9277554af Mon Sep 17 00:00:00 2001
+From: Nicholas Piggin <npiggin@gmail.com>
+Date: Tue, 1 Aug 2017 22:00:51 +1000
+Subject: [PATCH] powerpc/64s: Fix mce accounting for powernv
+
+References: bsc#1094244
+Patch-mainline: v4.14-rc1
+Git-commit: f886f0f6e0e20d53dc36421c2ee83fb9277554af
+
+On 64-bit Book3s, when we're in HV mode, we have already counted the
+machine check exception in machine_check_early().
+
+Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
+[mpe: Use IS_ENABLED() rather than an #ifdef]
+Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
+Acked-by: Michal Suchanek <msuchanek@suse.de>
+---
+ arch/powerpc/kernel/traps.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
+index bfcfd9ef09f2..d42c567e3c29 100644
+--- a/arch/powerpc/kernel/traps.c
++++ b/arch/powerpc/kernel/traps.c
+@@ -755,7 +755,9 @@ void machine_check_exception(struct pt_regs *regs)
+ enum ctx_state prev_state = exception_enter();
+ int recover = 0;
+
+- __this_cpu_inc(irq_stat.mce_exceptions);
++ /* 64s accounts the mce in machine_check_early when in HVMODE */
++ if (!IS_ENABLED(CONFIG_PPC_BOOK3S_64) || !cpu_has_feature(CPU_FTR_HVMODE))
++ __this_cpu_inc(irq_stat.mce_exceptions);
+
+ add_taint(TAINT_MACHINE_CHECK, LOCKDEP_NOW_UNRELIABLE);
+
+--
+2.13.7
+
diff --git a/series.conf b/series.conf
index d28a26d110..19892b08bc 100644
--- a/series.conf
+++ b/series.conf
@@ -4611,6 +4611,9 @@
patches.arch/powerpc-conditionally-compile-platform-specific-seri.patch
patches.arch/powerpc-signals-Discard-transaction-state-from-signa.patch
+ # bsc#1094244
+ patches.arch/powerpc-64s-Fix-mce-accounting-for-powernv.patch
+
########################################################
# powerpc/little endian
########################################################