linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc/64s: consolidate MCE counter increment.
@ 2018-09-26 12:24 Michal Suchanek
  2018-10-04  6:14 ` Michael Ellerman
  0 siblings, 1 reply; 2+ messages in thread
From: Michal Suchanek @ 2018-09-26 12:24 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
	Murilo Opsfelder Araujo, Cyril Bur, Eric W. Biederman,
	Nicholas Piggin, Michael Neuling, Anshuman Khandual,
	Michal Suchanek, Haren Myneni, Mahesh Salgaonkar, Balbir Singh,
	linuxppc-dev, linux-kernel


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>
---
 arch/powerpc/kernel/traps.c           | 4 +---
 arch/powerpc/platforms/powernv/opal.c | 2 --
 2 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
index 6ab66a88db14..e5bc413c7d53 100644
--- a/arch/powerpc/kernel/traps.c
+++ b/arch/powerpc/kernel/traps.c
@@ -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);
 
diff --git a/arch/powerpc/platforms/powernv/opal.c b/arch/powerpc/platforms/powernv/opal.c
index 62c291e23dbe..38fe4087484a 100644
--- a/arch/powerpc/platforms/powernv/opal.c
+++ b/arch/powerpc/platforms/powernv/opal.c
@@ -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;
 
-- 
2.13.7


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: powerpc/64s: consolidate MCE counter increment.
  2018-09-26 12:24 [PATCH] powerpc/64s: consolidate MCE counter increment Michal Suchanek
@ 2018-10-04  6:14 ` Michael Ellerman
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Ellerman @ 2018-10-04  6:14 UTC (permalink / raw)
  To: Michal Suchanek, Benjamin Herrenschmidt, Paul Mackerras,
	Murilo Opsfelder Araujo, Cyril Bur, Eric W. Biederman,
	Nicholas Piggin, Michael Neuling, Anshuman Khandual,
	Michal Suchanek, Haren Myneni, Mahesh Salgaonkar, Balbir Singh,
	linuxppc-dev, linux-kernel

On Wed, 2018-09-26 at 12:24:30 UTC, Michal Suchanek wrote:
> 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>

Applied to powerpc next, thanks.

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

cheers

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-10-04  6:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-26 12:24 [PATCH] powerpc/64s: consolidate MCE counter increment Michal Suchanek
2018-10-04  6:14 ` Michael Ellerman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).