From: Paul Mundt Date: Mon, 14 May 2007 23:36:36 +0000 (+0900) Subject: sh: Wire up kdump crash kernel exec in die(). X-Git-Tag: v2.6.22-rc3~94^2~2 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e113276624104d9c3b25f333d8dd999b804d980a;p=linux-2.6 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 --- diff --git a/arch/sh/kernel/traps.c b/arch/sh/kernel/traps.c index a01e36705c..5b75cb6f8f 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); }