Skip to contentSkip to conversation

powerpc/64s: consolidate MCE counter increment.

PATCH Applied Michal Suchanek 2 participants 2 messages Sep 26, 2018 – Oct 4, 2018 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.")
---
 arch/powerpc/kernel/traps.c           | 4 +---
 arch/powerpc/platforms/powernv/opal.c | 2 --
 2 files changed, 1 insertion(+), 5 deletions(-)
arch/powerpc/kernel/traps.c +1 -3
index 6ab66a88db14..e5bc413c7d53 100644
@@ -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);
 
arch/powerpc/platforms/powernv/opal.c +0 -2
index 62c291e23dbe..38fe4087484a 100644
@@ -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;
 
Signature · 1 line
2.13.7
#1 lore raw
Quoted 10 lines · Michal Suchanek

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.")

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/8a03e81cb14712f986c5d5fa42a30f

cheers