diff options
author | Paul Mundt <lethal@linux-sh.org> | 2007-05-14 19:36:36 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2007-05-21 01:34:37 -0400 |
commit | e113276624104d9c3b25f333d8dd999b804d980a (patch) | |
tree | 1b8945f42557679e81e1fbd382183e5914354bb4 /arch | |
parent | f3a9022fd187de41a04de9c5b44ff40e68c6d661 (diff) |
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 <lethal@linux-sh.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/sh/kernel/traps.c | 11 |
1 files changed, 11 insertions, 0 deletions
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 @@ | |||
21 | #include <linux/bug.h> | 21 | #include <linux/bug.h> |
22 | #include <linux/debug_locks.h> | 22 | #include <linux/debug_locks.h> |
23 | #include <linux/kdebug.h> | 23 | #include <linux/kdebug.h> |
24 | #include <linux/kexec.h> | ||
24 | #include <linux/limits.h> | 25 | #include <linux/limits.h> |
25 | #include <asm/system.h> | 26 | #include <asm/system.h> |
26 | #include <asm/uaccess.h> | 27 | #include <asm/uaccess.h> |
@@ -101,6 +102,16 @@ void die(const char * str, struct pt_regs * regs, long err) | |||
101 | 102 | ||
102 | bust_spinlocks(0); | 103 | bust_spinlocks(0); |
103 | spin_unlock_irq(&die_lock); | 104 | spin_unlock_irq(&die_lock); |
105 | |||
106 | if (kexec_should_crash(current)) | ||
107 | crash_kexec(regs); | ||
108 | |||
109 | if (in_interrupt()) | ||
110 | panic("Fatal exception in interrupt"); | ||
111 | |||
112 | if (panic_on_oops) | ||
113 | panic("Fatal exception"); | ||
114 | |||
104 | do_exit(SIGSEGV); | 115 | do_exit(SIGSEGV); |
105 | } | 116 | } |
106 | 117 | ||