aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips')
-rw-r--r--arch/mips/kernel/traps.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
index eccae8191602..a3c005126969 100644
--- a/arch/mips/kernel/traps.c
+++ b/arch/mips/kernel/traps.c
@@ -276,30 +276,18 @@ void show_registers(struct pt_regs *regs)
276 276
277static DEFINE_SPINLOCK(die_lock); 277static DEFINE_SPINLOCK(die_lock);
278 278
279NORET_TYPE void ATTRIB_NORET __die(const char * str, struct pt_regs * regs, 279NORET_TYPE void ATTRIB_NORET die(const char * str, struct pt_regs * regs)
280 const char * file, const char * func,
281 unsigned long line)
282{ 280{
283 static int die_counter; 281 static int die_counter;
284 282
285 console_verbose(); 283 console_verbose();
286 spin_lock_irq(&die_lock); 284 spin_lock_irq(&die_lock);
287 printk("%s", str); 285 printk("%s[#%d]:\n", str, ++die_counter);
288 if (file && func)
289 printk(" in %s:%s, line %ld", file, func, line);
290 printk("[#%d]:\n", ++die_counter);
291 show_registers(regs); 286 show_registers(regs);
292 spin_unlock_irq(&die_lock); 287 spin_unlock_irq(&die_lock);
293 do_exit(SIGSEGV); 288 do_exit(SIGSEGV);
294} 289}
295 290
296void __die_if_kernel(const char * str, struct pt_regs * regs,
297 const char * file, const char * func, unsigned long line)
298{
299 if (!user_mode(regs))
300 __die(str, regs, file, func, line);
301}
302
303extern const struct exception_table_entry __start___dbe_table[]; 291extern const struct exception_table_entry __start___dbe_table[];
304extern const struct exception_table_entry __stop___dbe_table[]; 292extern const struct exception_table_entry __stop___dbe_table[];
305 293