diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-12-25 15:53:11 +0300 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-12-25 15:53:11 +0300 |
commit | b594deb0cc54d857828d2e33b2e9d5a9f02f0e89 (patch) | |
tree | 1ce4e5e96dc2a3970d382ef952bf2683aa8c75a0 /kernel/panic.c | |
parent | 0b271ef4521756010675b1611bef20fd3096790d (diff) | |
parent | ec5679e513305f1411753e5f5489935bd638af23 (diff) | |
download | linux-b594deb0cc54d857828d2e33b2e9d5a9f02f0e89.tar.xz |
Merge branch 'core/debug' into core/core
Diffstat (limited to 'kernel/panic.c')
-rw-r--r-- | kernel/panic.c | 32 |
1 files changed, 12 insertions, 20 deletions
diff --git a/kernel/panic.c b/kernel/panic.c index 4d5088355bfe..13f06349a786 100644 --- a/kernel/panic.c +++ b/kernel/panic.c @@ -21,6 +21,7 @@ #include <linux/debug_locks.h> #include <linux/random.h> #include <linux/kallsyms.h> +#include <linux/dmi.h> int panic_on_oops; static unsigned long tainted_mask; @@ -321,36 +322,27 @@ void oops_exit(void) } #ifdef WANT_WARN_ON_SLOWPATH -void warn_on_slowpath(const char *file, int line) -{ - char function[KSYM_SYMBOL_LEN]; - unsigned long caller = (unsigned long) __builtin_return_address(0); - sprint_symbol(function, caller); - - printk(KERN_WARNING "------------[ cut here ]------------\n"); - printk(KERN_WARNING "WARNING: at %s:%d %s()\n", file, - line, function); - print_modules(); - dump_stack(); - print_oops_end_marker(); - add_taint(TAINT_WARN); -} -EXPORT_SYMBOL(warn_on_slowpath); - - void warn_slowpath(const char *file, int line, const char *fmt, ...) { va_list args; char function[KSYM_SYMBOL_LEN]; unsigned long caller = (unsigned long)__builtin_return_address(0); + const char *board; + sprint_symbol(function, caller); printk(KERN_WARNING "------------[ cut here ]------------\n"); printk(KERN_WARNING "WARNING: at %s:%d %s()\n", file, line, function); - va_start(args, fmt); - vprintk(fmt, args); - va_end(args); + board = dmi_get_system_info(DMI_PRODUCT_NAME); + if (board) + printk(KERN_WARNING "Hardware name: %s\n", board); + + if (fmt) { + va_start(args, fmt); + vprintk(fmt, args); + va_end(args); + } print_modules(); dump_stack(); |