From: Nicholas Piggin <npiggin@gmail.com>
To: linuxppc-dev@lists.ozlabs.org
Cc: Nicholas Piggin <npiggin@gmail.com>,
Michael Ellerman <mpe@ellerman.id.au>,
Mahesh Jagannath Salgaonkar <mahesh@linux.vnet.ibm.com>
Subject: [PATCH 3/4] powernv/pseries: machine check use kernel crash path
Date: Wed, 5 Jul 2017 14:04:21 +1000 [thread overview]
Message-ID: <20170705040422.20933-4-npiggin@gmail.com> (raw)
In-Reply-To: <20170705040422.20933-1-npiggin@gmail.com>
Similarly to the powernv patch, pseries can recover from and/or
print more error details from a recovered machine check if it
goes via the kernel crash path rather than panic()ing in the case
of MCE in kernel mode.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
arch/powerpc/platforms/pseries/ras.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/arch/powerpc/platforms/pseries/ras.c b/arch/powerpc/platforms/pseries/ras.c
index 4923ffe230cf..eeac00160de0 100644
--- a/arch/powerpc/platforms/pseries/ras.c
+++ b/arch/powerpc/platforms/pseries/ras.c
@@ -436,19 +436,19 @@ static int recover_mce(struct pt_regs *regs, struct rtas_error_log *err)
"be degraded\n");
recovered = 1;
- } else if (user_mode(regs) && !is_global_init(current) &&
- rtas_error_severity(err) == RTAS_SEVERITY_ERROR_SYNC) {
-
+ } else if (rtas_error_severity(err) == RTAS_SEVERITY_ERROR_SYNC) {
/*
- * If we received a synchronous error when in userspace
- * kill the task. Firmware may report details of the fail
- * asynchronously, so we can't rely on the target and type
- * fields being valid here.
+ * Firmware may report details of the fail asynchronously, so
+ * we can't rely on the target and type fields being valid
+ * here.
*/
- printk(KERN_ERR "MCE: uncorrectable error, killing task "
- "%s:%d\n", current->comm, current->pid);
-
- _exception(SIGBUS, regs, BUS_MCEERR_AR, regs->nip);
+ if ((user_mode(regs))) {
+ printk(KERN_ERR "MCE: uncorrectable error, killing task"
+ " %s:%d\n", current->comm, current->pid);
+ _exception(SIGBUS, regs, BUS_MCEERR_AR, regs->nip);
+ } else {
+ die("Machine check", regs, SIGBUS);
+ }
recovered = 1;
}
--
2.11.0
next prev parent reply other threads:[~2017-07-05 4:04 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-05 4:04 [PATCH 0/4] machine check handling improvements Nicholas Piggin
2017-07-05 4:04 ` [PATCH 1/4] powerpc/powernv: handle the platform error reboot in ppc_md.restart Nicholas Piggin
2017-07-05 4:23 ` Nicholas Piggin
2017-07-06 17:56 ` Nicholas Piggin
2017-07-10 5:48 ` Mahesh Jagannath Salgaonkar
2017-07-11 17:09 ` Nicholas Piggin
2017-07-05 4:04 ` [PATCH 2/4] powerpc/powernv: machine check use kernel crash path Nicholas Piggin
2017-07-05 4:04 ` Nicholas Piggin [this message]
2017-07-05 4:04 ` [PATCH 4/4] powerpc: machine check interrupt is a non-maskable interrupt Nicholas Piggin
2017-07-06 18:13 ` kbuild test robot
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=20170705040422.20933-4-npiggin@gmail.com \
--to=npiggin@gmail.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mahesh@linux.vnet.ibm.com \
--cc=mpe@ellerman.id.au \
/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).