aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorNathan Lynch <ntl@pobox.com>2011-09-30 13:49:35 -0500
committerRalf Baechle <ralf@linux-mips.org>2011-10-01 20:36:04 +0100
commit8742cd23471635f8b069bf9a6806200a77397ddb (patch)
tree442a80035d5659fc8656c2450fdcf8349f53f54a /arch
parenta4be637b34a543af5b5421a8ee0ee04d30f5f58e (diff)
MIPS: Call oops_enter, oops_exit in die
This allows pause_on_oops and mtdoops to work. Signed-off-by: Nathan Lynch <ntl@pobox.com> To: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/2810/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/mips/kernel/traps.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
index 01eff7e609e..cbea618af0b 100644
--- a/arch/mips/kernel/traps.c
+++ b/arch/mips/kernel/traps.c
@@ -14,6 +14,7 @@
#include <linux/bug.h>
#include <linux/compiler.h>
#include <linux/init.h>
+#include <linux/kernel.h>
#include <linux/mm.h>
#include <linux/module.h>
#include <linux/sched.h>
@@ -371,14 +372,19 @@ void __noreturn die(const char *str, struct pt_regs *regs)
static int die_counter;
int sig = SIGSEGV;
#ifdef CONFIG_MIPS_MT_SMTC
- unsigned long dvpret = dvpe();
+ unsigned long dvpret;
#endif /* CONFIG_MIPS_MT_SMTC */
+ oops_enter();
+
if (notify_die(DIE_OOPS, str, regs, 0, regs_to_trapnr(regs), SIGSEGV) == NOTIFY_STOP)
sig = 0;
console_verbose();
raw_spin_lock_irq(&die_lock);
+#ifdef CONFIG_MIPS_MT_SMTC
+ dvpret = dvpe();
+#endif /* CONFIG_MIPS_MT_SMTC */
bust_spinlocks(1);
#ifdef CONFIG_MIPS_MT_SMTC
mips_mt_regdump(dvpret);
@@ -389,6 +395,8 @@ void __noreturn die(const char *str, struct pt_regs *regs)
add_taint(TAINT_DIE);
raw_spin_unlock_irq(&die_lock);
+ oops_exit();
+
if (in_interrupt())
panic("Fatal exception in interrupt");