From: Nicholas Piggin <npiggin@gmail.com>
To: linuxppc-dev@lists.ozlabs.org
Cc: Nicholas Piggin <npiggin@gmail.com>,
Michael Ellerman <mpe@ellerman.id.au>
Subject: [PATCH 1/3] powerpc: do not call ppc_md.panic in panic notifier if fadump not used
Date: Tue, 4 Jul 2017 20:09:07 +1000 [thread overview]
Message-ID: <20170704100909.8738-2-npiggin@gmail.com> (raw)
In-Reply-To: <20170704100909.8738-1-npiggin@gmail.com>
If fadump is not registered, and no other crash or debug handlers are
registered, the powerpc panic handler stops the guest before the generic
panic code can push out debug information to the console.
Without this patch, system reset injection to a guest causes the guest to
silently stop. Afterwards, we get the expected oops trace.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
arch/powerpc/kernel/setup-common.c | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c
index 94a948207cd2..39ba09965b04 100644
--- a/arch/powerpc/kernel/setup-common.c
+++ b/arch/powerpc/kernel/setup-common.c
@@ -707,12 +707,15 @@ EXPORT_SYMBOL(check_legacy_ioport);
static int ppc_panic_event(struct notifier_block *this,
unsigned long event, void *ptr)
{
- /*
- * If firmware-assisted dump has been registered then trigger
- * firmware-assisted dump and let firmware handle everything else.
- */
- crash_fadump(NULL, ptr);
- ppc_md.panic(ptr); /* May not return */
+ if (is_fadump_active()) {
+ /*
+ * If firmware-assisted dump has been registered then trigger
+ * firmware-assisted dump and let firmware handle everything
+ * else.
+ */
+ crash_fadump(NULL, ptr);
+ ppc_md.panic(ptr); /* May not return */
+ }
return NOTIFY_DONE;
}
--
2.11.0
next prev parent reply other threads:[~2017-07-04 10:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-04 10:09 [PATCH 0/3] sreset debugging improvements Nicholas Piggin
2017-07-04 10:09 ` Nicholas Piggin [this message]
2017-07-04 16:52 ` [PATCH 1/3] powerpc: do not call ppc_md.panic in panic notifier if fadump not used Mahesh Jagannath Salgaonkar
2017-07-04 23:42 ` Michael Ellerman
2017-07-05 0:16 ` Nicholas Piggin
2017-07-04 10:09 ` [PATCH 2/3] powerpc/pseries/le: work around a firmware quirk Nicholas Piggin
2017-07-04 10:09 ` [PATCH 3/3] powerpc: do not send system reset request through the oops path 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=20170704100909.8738-2-npiggin@gmail.com \
--to=npiggin@gmail.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--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).