diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2005-10-13 17:07:54 +0100 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2005-10-29 19:32:42 +0100 |
commit | 178086c86ac9738a76f1462e9ee4cbe8fd3b8c51 (patch) | |
tree | 7981d13e3037b51acfe83b7280804ea73c6b7013 /include | |
parent | 6ec25809c143d875ed17b2e85d1dd894a1f4aba4 (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 'include')
-rw-r--r-- | include/asm-mips/system.h | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/include/asm-mips/system.h b/include/asm-mips/system.h index b126545e96e..330c4e497af 100644 --- a/include/asm-mips/system.h +++ b/include/asm-mips/system.h @@ -434,15 +434,13 @@ extern void *set_vi_srs_handler (int n, void *addr, int regset); extern void *set_except_vector(int n, void *addr); extern void per_cpu_trap_init(void); -extern NORET_TYPE void __die(const char *, struct pt_regs *, const char *file, - const char *func, unsigned long line) ATTRIB_NORET; -extern void __die_if_kernel(const char *, struct pt_regs *, const char *file, - const char *func, unsigned long line); - -#define die(msg, regs) \ - __die(msg, regs, __FILE__ ":", __FUNCTION__, __LINE__) -#define die_if_kernel(msg, regs) \ - __die_if_kernel(msg, regs, __FILE__ ":", __FUNCTION__, __LINE__) +extern NORET_TYPE void die(const char *, struct pt_regs *); + +static inline void die_if_kernel(const char *str, struct pt_regs *regs) +{ + if (unlikely(!user_mode(regs))) + die(str, regs); +} extern int stop_a_enabled; |