From: Michal Suchanek <msuchanek@suse.de>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Paul Mackerras <paulus@samba.org>,
Michael Ellerman <mpe@ellerman.id.au>,
Murilo Opsfelder Araujo <muriloo@linux.ibm.com>,
Cyril Bur <cyrilbur@gmail.com>,
"Eric W. Biederman" <ebiederm@xmission.com>,
Nicholas Piggin <npiggin@gmail.com>,
Michael Neuling <mikey@neuling.org>,
Anshuman Khandual <khandual@linux.vnet.ibm.com>,
Michal Suchanek <msuchanek@suse.de>,
Haren Myneni <haren@linux.vnet.ibm.com>,
Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>,
Balbir Singh <bsingharora@gmail.com>,
linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org
Subject: [PATCH] powerpc/64s: consolidate MCE counter increment.
Date: Wed, 26 Sep 2018 14:24:30 +0200 [thread overview]
Message-ID: <20180926122430.13924-1-msuchanek@suse.de> (raw)
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
next reply other threads:[~2018-09-26 12:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-26 12:24 Michal Suchanek [this message]
2018-10-04 6:14 ` powerpc/64s: consolidate MCE counter increment Michael Ellerman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180926122430.13924-1-msuchanek@suse.de \
--to=msuchanek@suse.de \
--cc=benh@kernel.crashing.org \
--cc=bsingharora@gmail.com \
--cc=cyrilbur@gmail.com \
--cc=ebiederm@xmission.com \
--cc=haren@linux.vnet.ibm.com \
--cc=khandual@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mahesh@linux.vnet.ibm.com \
--cc=mikey@neuling.org \
--cc=mpe@ellerman.id.au \
--cc=muriloo@linux.ibm.com \
--cc=npiggin@gmail.com \
--cc=paulus@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).