Skip to content

Commit

Permalink
sh: Wire up kdump crash kernel exec in die().
Browse files Browse the repository at this point in the history
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 <lethal@linux-sh.org>
  • Loading branch information
Paul Mundt committed May 21, 2007
1 parent f3a9022 commit e113276
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions arch/sh/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <linux/bug.h>
#include <linux/debug_locks.h>
#include <linux/kdebug.h>
#include <linux/kexec.h>
#include <linux/limits.h>
#include <asm/system.h>
#include <asm/uaccess.h>
Expand Down Expand Up @@ -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);
}

Expand Down

0 comments on commit e113276

Please sign in to comment.