Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: 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>

authored by

Michal Suchanek and committed by
Michael Ellerman
8a03e81c 51303113

+1 -5
+1 -3
arch/powerpc/kernel/traps.c
··· 741 741 if (!nested) 742 742 nmi_enter(); 743 743 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); 747 745 748 746 add_taint(TAINT_MACHINE_CHECK, LOCKDEP_NOW_UNRELIABLE); 749 747
-2
arch/powerpc/platforms/powernv/opal.c
··· 578 578 { 579 579 struct machine_check_event evt; 580 580 581 - __this_cpu_inc(irq_stat.mce_exceptions); 582 - 583 581 if (!get_mce_event(&evt, MCE_EVENT_RELEASE)) 584 582 return 0; 585 583