From e113276624104d9c3b25f333d8dd999b804d980a Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Tue, 15 May 2007 08:36:36 +0900 Subject: sh: Wire up kdump crash kernel exec in die(). Now that we have the basic kdump support in place, add it in to die() so we can enter the crash kernel automatically. Signed-off-by: Paul Mundt --- arch/sh/kernel/traps.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/arch/sh/kernel/traps.c b/arch/sh/kernel/traps.c index a01e36705c5..5b75cb6f8f9 100644 --- a/arch/sh/kernel/traps.c +++ b/arch/sh/kernel/traps.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -101,6 +102,16 @@ void die(const char * str, struct pt_regs * regs, long err) bust_spinlocks(0); spin_unlock_irq(&die_lock); + + if (kexec_should_crash(current)) + crash_kexec(regs); + + if (in_interrupt()) + panic("Fatal exception in interrupt"); + + if (panic_on_oops) + panic("Fatal exception"); + do_exit(SIGSEGV); } -- cgit v1.2.3