Home Home > GIT Browse > openSUSE-15.0
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Suchanek <msuchanek@suse.de>2018-07-10 19:00:38 +0200
committerMichal Suchanek <msuchanek@suse.de>2018-07-10 19:00:44 +0200
commit608d234e744f7ca1de557357c3653a957512953c (patch)
tree145cd2d334915bbe8f9db41cbabb2ca97c44e93d
parent5a0512ac52dc6bc7dccf54b1da2b093f96cefba1 (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 28150adde06d..b4550ed71efd 100644
--- a/arch/powerpc/kernel/traps.c
+++ b/arch/powerpc/kernel/traps.c
@@ -754,7 +754,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);