aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/traps_64.c
diff options
context:
space:
mode:
authorAlexander van Heukelum <heukelum@mailshack.com>2008-07-10 15:16:39 -0400
committerIngo Molnar <mingo@elte.hu>2008-07-18 10:21:17 -0400
commit7dedcee394a3f61475d08002bd12e8068d044216 (patch)
tree1a6ee77e377416ad66fc57e258feb82f52f2ff98 /arch/x86/kernel/traps_64.c
parent78cbac65fd77242f3e5d77f4d7a71e8bc869fe4d (diff)
x86: traps_xx: modify x86_64 to use _log_lvl variants
i386 has show_trace_log_lvl and show_stack_log_lvl, allowing traces to be emitted with log-level annotations. This patch introduces them to x86_64, but log_lvl is only ever set to an empty string. Output of traces is unchanged. i386-chunk is whitespace-only. Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm> Cc: Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/traps_64.c')
-rw-r--r--arch/x86/kernel/traps_64.c24
1 files changed, 16 insertions, 8 deletions
diff --git a/arch/x86/kernel/traps_64.c b/arch/x86/kernel/traps_64.c
index babdbe673b7f..c664e6962009 100644
--- a/arch/x86/kernel/traps_64.c
+++ b/arch/x86/kernel/traps_64.c
@@ -355,17 +355,24 @@ static const struct stacktrace_ops print_trace_ops = {
355 .address = print_trace_address, 355 .address = print_trace_address,
356}; 356};
357 357
358void show_trace(struct task_struct *task, struct pt_regs *regs, 358static void
359 unsigned long *stack, unsigned long bp) 359show_trace_log_lvl(struct task_struct *task, struct pt_regs *regs,
360 unsigned long *stack, unsigned long bp, char *log_lvl)
360{ 361{
361 printk("\nCall Trace:\n"); 362 printk("\nCall Trace:\n");
362 dump_trace(task, regs, stack, bp, &print_trace_ops, NULL); 363 dump_trace(task, regs, stack, bp, &print_trace_ops, log_lvl);
363 printk("\n"); 364 printk("\n");
364} 365}
365 366
367void show_trace(struct task_struct *task, struct pt_regs *regs,
368 unsigned long *stack, unsigned long bp)
369{
370 show_trace_log_lvl(task, regs, stack, bp, "");
371}
372
366static void 373static void
367_show_stack(struct task_struct *task, struct pt_regs *regs, 374show_stack_log_lvl(struct task_struct *task, struct pt_regs *regs,
368 unsigned long *sp, unsigned long bp) 375 unsigned long *sp, unsigned long bp, char *log_lvl)
369{ 376{
370 unsigned long *stack; 377 unsigned long *stack;
371 int i; 378 int i;
@@ -399,12 +406,12 @@ _show_stack(struct task_struct *task, struct pt_regs *regs,
399 printk(" %016lx", *stack++); 406 printk(" %016lx", *stack++);
400 touch_nmi_watchdog(); 407 touch_nmi_watchdog();
401 } 408 }
402 show_trace(task, regs, sp, bp); 409 show_trace_log_lvl(task, regs, sp, bp, log_lvl);
403} 410}
404 411
405void show_stack(struct task_struct *task, unsigned long *sp) 412void show_stack(struct task_struct *task, unsigned long *sp)
406{ 413{
407 _show_stack(task, NULL, sp, 0); 414 show_stack_log_lvl(task, NULL, sp, 0, "");
408} 415}
409 416
410/* 417/*
@@ -454,7 +461,8 @@ void show_registers(struct pt_regs *regs)
454 u8 *ip; 461 u8 *ip;
455 462
456 printk("Stack: "); 463 printk("Stack: ");
457 _show_stack(NULL, regs, (unsigned long *)sp, regs->bp); 464 show_stack_log_lvl(NULL, regs, (unsigned long *)sp,
465 regs->bp, "");
458 printk("\n"); 466 printk("\n");
459 467
460 printk(KERN_EMERG "Code: "); 468 printk(KERN_EMERG "Code: ");