From: "M. Mohan Kumar" <mohan@in.ibm.com>
To: benh@kernel.crashing.org
Cc: linuxppc-dev@ozlabs.org, kamalesh@linux.vnet.ibm.com
Subject: [PATCH] powerpc: Invoke kdump for system reset exception
Date: Mon, 24 Aug 2009 08:42:44 +0530 [thread overview]
Message-ID: <20090824031244.GA3590@in.ibm.com> (raw)
Invoke kdump for system reset exception
Dump restart operation from HMC raises system reset exception
(0x100) and xmon is invoked(even if kdump kernel is loaded). User has to
exit from xmon by saying 'Don't recover' to invoke kdump. Modify this
behaviour so that xmon will return immediately for system reset
exception and kdump kernel will be invoked (if its loaded). If kdump
kernel is not loaded, proceed with xmon
Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com>
---
arch/powerpc/xmon/xmon.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
index e1f33a8..6847334 100644
--- a/arch/powerpc/xmon/xmon.c
+++ b/arch/powerpc/xmon/xmon.c
@@ -23,6 +23,7 @@
#include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/bug.h>
+#include <linux/kexec.h>
#include <asm/ptrace.h>
#include <asm/string.h>
@@ -348,6 +349,14 @@ static int xmon_core(struct pt_regs *regs, int fromipi)
unsigned long timeout;
#endif
+ /*
+ * If the exception is 0x100 and if kexec crash image is loaded,
+ * continue with kexec_crash
+ */
+ if (kexec_should_crash(current) && kexec_crash_image &&
+ regs->trap == 0x100)
+ return 0;
+
local_irq_save(flags);
bp = in_breakpoint_table(regs->nip, &offset);
--
1.6.2.5
next reply other threads:[~2009-08-24 3:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-24 3:12 M. Mohan Kumar [this message]
2009-08-27 3:54 ` [PATCH] powerpc: Invoke kdump for system reset exception Benjamin Herrenschmidt
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=20090824031244.GA3590@in.ibm.com \
--to=mohan@in.ibm.com \
--cc=benh@kernel.crashing.org \
--cc=kamalesh@linux.vnet.ibm.com \
--cc=linuxppc-dev@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).