aboutsummaryrefslogtreecommitdiffstats
path: root/arch/h8300/kernel/traps.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/h8300/kernel/traps.c')
-rw-r--r--arch/h8300/kernel/traps.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/arch/h8300/kernel/traps.c b/arch/h8300/kernel/traps.c
index f8f7d7ea97f1..3c0b66bc669e 100644
--- a/arch/h8300/kernel/traps.c
+++ b/arch/h8300/kernel/traps.c
@@ -20,12 +20,14 @@
20#include <linux/errno.h> 20#include <linux/errno.h>
21#include <linux/init.h> 21#include <linux/init.h>
22#include <linux/module.h> 22#include <linux/module.h>
23#include <linux/bug.h>
23 24
24#include <asm/system.h> 25#include <asm/system.h>
25#include <asm/irq.h> 26#include <asm/irq.h>
26#include <asm/traps.h> 27#include <asm/traps.h>
27#include <asm/page.h> 28#include <asm/page.h>
28#include <asm/gpio.h> 29
30static DEFINE_SPINLOCK(die_lock);
29 31
30/* 32/*
31 * this must be called very early as the kernel might 33 * this must be called very early as the kernel might
@@ -94,16 +96,19 @@ static void dump(struct pt_regs *fp)
94 printk("\n\n"); 96 printk("\n\n");
95} 97}
96 98
97void die_if_kernel (char *str, struct pt_regs *fp, int nr) 99void die(char *str, struct pt_regs *fp, unsigned long err)
98{ 100{
99 extern int console_loglevel; 101 static int diecount;
100 102
101 if (!(fp->ccr & PS_S)) 103 oops_enter();
102 return;
103 104
104 console_loglevel = 15; 105 console_verbose();
106 spin_lock_irq(&die_lock);
107 report_bug(fp->pc, fp);
108 printk(KERN_EMERG "%s: %04lx [#%d] ", str, err & 0xffff, ++diecount);
105 dump(fp); 109 dump(fp);
106 110
111 spin_unlock_irq(&die_lock);
107 do_exit(SIGSEGV); 112 do_exit(SIGSEGV);
108} 113}
109 114