diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-06-17 06:52:15 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-06-17 06:56:49 -0400 |
commit | eadb8a091b27a840de7450f84ecff5ef13476424 (patch) | |
tree | 58c3782d40def63baa8167f3d31e3048cb4c7660 /kernel/panic.c | |
parent | 73874005cd8800440be4299bd095387fff4b90ac (diff) | |
parent | 65795efbd380a832ae508b04dba8f8e53f0b84d9 (diff) |
Merge branch 'linus' into tracing/hw-breakpoints
Conflicts:
arch/x86/Kconfig
arch/x86/kernel/traps.c
arch/x86/power/cpu.c
arch/x86/power/cpu_32.c
kernel/Makefile
Semantic conflict:
arch/x86/kernel/hw_breakpoint.c
Merge reason: Resolve the conflicts, move from put_cpu_no_sched() to
put_cpu() in arch/x86/kernel/hw_breakpoint.c.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/panic.c')
-rw-r--r-- | kernel/panic.c | 35 |
1 files changed, 20 insertions, 15 deletions
diff --git a/kernel/panic.c b/kernel/panic.c index 874ecf1307ae..984b3ecbd72c 100644 --- a/kernel/panic.c +++ b/kernel/panic.c | |||
@@ -340,39 +340,44 @@ void oops_exit(void) | |||
340 | } | 340 | } |
341 | 341 | ||
342 | #ifdef WANT_WARN_ON_SLOWPATH | 342 | #ifdef WANT_WARN_ON_SLOWPATH |
343 | void warn_slowpath_fmt(const char *file, int line, const char *fmt, ...) | 343 | struct slowpath_args { |
344 | { | 344 | const char *fmt; |
345 | va_list args; | 345 | va_list args; |
346 | char function[KSYM_SYMBOL_LEN]; | 346 | }; |
347 | unsigned long caller = (unsigned long)__builtin_return_address(0); | ||
348 | const char *board; | ||
349 | 347 | ||
350 | sprint_symbol(function, caller); | 348 | static void warn_slowpath_common(const char *file, int line, void *caller, struct slowpath_args *args) |
349 | { | ||
350 | const char *board; | ||
351 | 351 | ||
352 | printk(KERN_WARNING "------------[ cut here ]------------\n"); | 352 | printk(KERN_WARNING "------------[ cut here ]------------\n"); |
353 | printk(KERN_WARNING "WARNING: at %s:%d %s()\n", file, | 353 | printk(KERN_WARNING "WARNING: at %s:%d %pS()\n", file, line, caller); |
354 | line, function); | ||
355 | board = dmi_get_system_info(DMI_PRODUCT_NAME); | 354 | board = dmi_get_system_info(DMI_PRODUCT_NAME); |
356 | if (board) | 355 | if (board) |
357 | printk(KERN_WARNING "Hardware name: %s\n", board); | 356 | printk(KERN_WARNING "Hardware name: %s\n", board); |
358 | 357 | ||
359 | if (*fmt) { | 358 | if (args) |
360 | va_start(args, fmt); | 359 | vprintk(args->fmt, args->args); |
361 | vprintk(fmt, args); | ||
362 | va_end(args); | ||
363 | } | ||
364 | 360 | ||
365 | print_modules(); | 361 | print_modules(); |
366 | dump_stack(); | 362 | dump_stack(); |
367 | print_oops_end_marker(); | 363 | print_oops_end_marker(); |
368 | add_taint(TAINT_WARN); | 364 | add_taint(TAINT_WARN); |
369 | } | 365 | } |
366 | |||
367 | void warn_slowpath_fmt(const char *file, int line, const char *fmt, ...) | ||
368 | { | ||
369 | struct slowpath_args args; | ||
370 | |||
371 | args.fmt = fmt; | ||
372 | va_start(args.args, fmt); | ||
373 | warn_slowpath_common(file, line, __builtin_return_address(0), &args); | ||
374 | va_end(args.args); | ||
375 | } | ||
370 | EXPORT_SYMBOL(warn_slowpath_fmt); | 376 | EXPORT_SYMBOL(warn_slowpath_fmt); |
371 | 377 | ||
372 | void warn_slowpath_null(const char *file, int line) | 378 | void warn_slowpath_null(const char *file, int line) |
373 | { | 379 | { |
374 | static const char *empty = ""; | 380 | warn_slowpath_common(file, line, __builtin_return_address(0), NULL); |
375 | warn_slowpath_fmt(file, line, empty); | ||
376 | } | 381 | } |
377 | EXPORT_SYMBOL(warn_slowpath_null); | 382 | EXPORT_SYMBOL(warn_slowpath_null); |
378 | #endif | 383 | #endif |