powerpc/64s: consolidate MCE counter increment.
authorMichal Suchanek <msuchanek@suse.de>
Wed, 26 Sep 2018 12:24:30 +0000 (14:24 +0200)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 3 Oct 2018 05:40:06 +0000 (15:40 +1000)
The code in machine_check_exception excludes 64s hvmode when
incrementing the MCE counter only to call opal_machine_check to
increment it specifically for this case.

Remove the exclusion and special case.

Fixes: a43c1590426c ("powerpc/pseries: Flush SLB contents on SLB MCE
errors.")

Signed-off-by: Michal Suchanek <msuchanek@suse.de>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/kernel/traps.c
arch/powerpc/platforms/powernv/opal.c

index 5ef85ab49dc30a5ddce856d7db9cea3d0b56665b..fd58749b4d6b3aca47a74571d24f0141e2797007 100644 (file)
@@ -741,9 +741,7 @@ void machine_check_exception(struct pt_regs *regs)
        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))
-               __this_cpu_inc(irq_stat.mce_exceptions);
+       __this_cpu_inc(irq_stat.mce_exceptions);
 
        add_taint(TAINT_MACHINE_CHECK, LOCKDEP_NOW_UNRELIABLE);
 
index 06bf532fa00023d5cf02e5d09196e06112ef1a3f..a4641515956f4f64a949e79fdac9d3e380ce41f4 100644 (file)
@@ -578,8 +578,6 @@ int opal_machine_check(struct pt_regs *regs)
 {
        struct machine_check_event evt;
 
-       __this_cpu_inc(irq_stat.mce_exceptions);
-
        if (!get_mce_event(&evt, MCE_EVENT_RELEASE))
                return 0;