[PATCH] powerpc: Invoke kdump for system reset exception

M. Mohan Kumar mohan at in.ibm.com
Mon Aug 24 13:12:44 EST 2009

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 at 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;
+	/*
+	 * 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;
 	bp = in_breakpoint_table(regs->nip, &offset);

More information about the Linuxppc-dev mailing list