linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Nicholas Piggin <npiggin@gmail.com>
To: linuxppc-dev@lists.ozlabs.org
Cc: Nicholas Piggin <npiggin@gmail.com>
Subject: [PATCH v2 1/4] powerpc/64s: fix mce accounting for powernv
Date: Tue,  1 Aug 2017 22:00:51 +1000	[thread overview]
Message-ID: <20170801120054.3447-2-npiggin@gmail.com> (raw)
In-Reply-To: <20170801120054.3447-1-npiggin@gmail.com>

---
 arch/powerpc/kernel/traps.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
index bfcfd9ef09f2..5adfea2dc822 100644
--- a/arch/powerpc/kernel/traps.c
+++ b/arch/powerpc/kernel/traps.c
@@ -755,7 +755,14 @@ void machine_check_exception(struct pt_regs *regs)
 	enum ctx_state prev_state = exception_enter();
 	int recover = 0;
 
+#ifdef CONFIG_PPC_BOOK3S_64
+	/* 64s accounts the mce in machine_check_early when in HVMODE */
+	if (!cpu_has_feature(CPU_FTR_HVMODE))
+		__this_cpu_inc(irq_stat.mce_exceptions);
+#else
 	__this_cpu_inc(irq_stat.mce_exceptions);
+#endif
+
 
 	add_taint(TAINT_MACHINE_CHECK, LOCKDEP_NOW_UNRELIABLE);
 
-- 
2.11.0

  reply	other threads:[~2017-08-01 12:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-01 12:00 [PATCH v2 0/4] powerpc: improve accounting of non maskable interrupts Nicholas Piggin
2017-08-01 12:00 ` Nicholas Piggin [this message]
2017-08-11 12:19   ` [v2,1/4] powerpc/64s: fix mce accounting for powernv Michael Ellerman
2017-08-01 12:00 ` [PATCH v2 2/4] powerpc: Fix powerpc-specific watchdog build configuration Nicholas Piggin
2017-08-01 12:00 ` [PATCH v2 3/4] powerpc: add irq accounting for system reset interrupts Nicholas Piggin
2017-08-02  2:00   ` Nicholas Piggin
2017-08-01 12:00 ` [PATCH v2 4/4] powerpc: add irq accounting for watchdog interrupts Nicholas Piggin

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=20170801120054.3447-2-npiggin@gmail.com \
    --to=npiggin@gmail.com \
    --cc=linuxppc-dev@lists.ozlabs.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).