aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel/traps.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2005-10-13 12:07:54 -0400
committerRalf Baechle <ralf@linux-mips.org>2005-10-29 14:32:42 -0400
commit178086c86ac9738a76f1462e9ee4cbe8fd3b8c51 (patch)
tree7981d13e3037b51acfe83b7280804ea73c6b7013 /arch/mips/kernel/traps.c
parent6ec25809c143d875ed17b2e85d1dd894a1f4aba4 (diff)
Don't print file name and line in die and die_if_kernel.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/kernel/traps.c')
-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