Home Home > GIT Browse > openSUSE-42.3
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
commitf70924b0845d29df3c4b6d8586b09583e1720ee5 (patch)
treeb0596427334d984d50a7ddcf131b617457929c56
parent2a672f66d572e8acdcb1c872948a15525e033f42 (diff)
powerpc/64s: Fix mce accounting for powernv (bsc#1094244).
-rw-r--r--arch/powerpc/kernel/traps.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
index 970a500b8db0..a2846ffc1339 100644
--- a/arch/powerpc/kernel/traps.c
+++ b/arch/powerpc/kernel/traps.c
@@ -716,7 +716,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);