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-Url: https://git.stricted.de/?a=commitdiff_plain;h=e113276624104d9c3b25f333d8dd999b804d980a;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 a01e36705c5f..5b75cb6f8f9b 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); }