remove die/die_if_kernel __FUNCTION__ cat for gcc 3.x's sake
PATCH 1/1 remove die/die_if_kernel __FUNCTION__ cat for gcc 3.x's sake
include/asm-mips/system.h +6 -6
@@ -276,14 +276,14 @@extern void *set_except_vector (int n,void *addr); -extern void __die (const char *,struct pt_regs *,const char *where, -unsigned long line) __attribute__((noreturn)); -extern void __die_if_kernel (const char *,struct pt_regs *,const char *where, -unsigned long line); +extern void __die (const char *,struct pt_regs *,const char *file, +const char *function,unsigned long line) __attribute__((noreturn)); +extern void __die_if_kernel (const char *,struct pt_regs *,const char *file, +const char *function,unsigned long line);#define die (msg, regs) \ - __die(msg, regs, __FILE__ ":"__FUNCTION__, __LINE__) + __die(msg, regs, __FILE__, __FUNCTION__, __LINE__)#define die_if_kernel (msg, regs) \ - __die_if_kernel(msg, regs, __FILE__ ":"__FUNCTION__, __LINE__) + __die_if_kernel(msg, regs, __FILE__, __FUNCTION__, __LINE__)#endif /* _ASM_SYSTEM_H */
arch/mips/kernel/traps.c +7 -7
@@ -327,25 +327,25 @@static spinlock_t die_lock =SPIN_LOCK_UNLOCKED ; -void __die (const char * str,struct pt_regs * regs,const char *where, -unsigned long line) +void __die (const char * str,struct pt_regs * regs,const char *file, +const char *function,unsigned long line) {console_verbose ();spin_lock_irq (&die_lock);printk ("%s" , str); -if (where) -printk (" in %s, line %ld" , where, line); +if (file && function) +printk (" in %s:%s, line %ld" , file, function, line);printk (":\n" );show_registers (regs);spin_unlock_irq (&die_lock);do_exit (SIGSEGV ); } -void __die_if_kernel (const char * str,struct pt_regs * regs,const char *where, -unsigned long line) +void __die_if_kernel (const char * str,struct pt_regs * regs,const char *file, +const char * function,unsigned long line) {if (!user_mode (regs)) -__die (str, regs, where, line); +__die (str, regs, file, function, line); }extern const struct exception_table_entry __start___dbe_table[];