Skip to content

Commit 8a03e81

Browse files
hramrachmpe
authored andcommitted
powerpc/64s: consolidate MCE counter increment.
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: a43c159 ("powerpc/pseries: Flush SLB contents on SLB MCE errors.") Signed-off-by: Michal Suchanek <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
1 parent 5130311 commit 8a03e81

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

arch/powerpc/kernel/traps.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -741,9 +741,7 @@ void machine_check_exception(struct pt_regs *regs)
741741
if (!nested)
742742
nmi_enter();
743743

744-
/* 64s accounts the mce in machine_check_early when in HVMODE */
745-
if (!IS_ENABLED(CONFIG_PPC_BOOK3S_64) || !cpu_has_feature(CPU_FTR_HVMODE))
746-
__this_cpu_inc(irq_stat.mce_exceptions);
744+
__this_cpu_inc(irq_stat.mce_exceptions);
747745

748746
add_taint(TAINT_MACHINE_CHECK, LOCKDEP_NOW_UNRELIABLE);
749747

arch/powerpc/platforms/powernv/opal.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -578,8 +578,6 @@ int opal_machine_check(struct pt_regs *regs)
578578
{
579579
struct machine_check_event evt;
580580

581-
__this_cpu_inc(irq_stat.mce_exceptions);
582-
583581
if (!get_mce_event(&evt, MCE_EVENT_RELEASE))
584582
return 0;
585583

0 commit comments

Comments
 (0)