x86/debug: Add KERN_<LEVEL> to bare printks, convert printks to pr_<level>
Use a more current logging style: - Bare printks should have a KERN_<LEVEL> for consistency's sake - Add pr_fmt where appropriate - Neaten some macro definitions - Convert some Ok output to OK - Use "%s: ", __func__ in pr_fmt for summit - Convert some printks to pr_<level> Message output is not identical in all cases. Signed-off-by: Joe Perches <joe@perches.com> Cc: levinsasha928@gmail.com Link: http://lkml.kernel.org/r/1337655007.24226.10.camel@joe2Laptop [ merged two similar patches, tidied up the changelog ] Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
@@ -228,20 +228,20 @@ show_stack_log_lvl(struct task_struct *task, struct pt_regs *regs,
|
||||
if (stack >= irq_stack && stack <= irq_stack_end) {
|
||||
if (stack == irq_stack_end) {
|
||||
stack = (unsigned long *) (irq_stack_end[-1]);
|
||||
printk(KERN_CONT " <EOI> ");
|
||||
pr_cont(" <EOI> ");
|
||||
}
|
||||
} else {
|
||||
if (((long) stack & (THREAD_SIZE-1)) == 0)
|
||||
break;
|
||||
}
|
||||
if (i && ((i % STACKSLOTS_PER_LINE) == 0))
|
||||
printk(KERN_CONT "\n");
|
||||
printk(KERN_CONT " %016lx", *stack++);
|
||||
pr_cont("\n");
|
||||
pr_cont(" %016lx", *stack++);
|
||||
touch_nmi_watchdog();
|
||||
}
|
||||
preempt_enable();
|
||||
|
||||
printk(KERN_CONT "\n");
|
||||
pr_cont("\n");
|
||||
show_trace_log_lvl(task, regs, sp, bp, log_lvl);
|
||||
}
|
||||
|
||||
@@ -256,8 +256,8 @@ void show_regs(struct pt_regs *regs)
|
||||
printk("CPU %d ", cpu);
|
||||
print_modules();
|
||||
__show_regs(regs, 1);
|
||||
printk("Process %s (pid: %d, threadinfo %p, task %p)\n",
|
||||
cur->comm, cur->pid, task_thread_info(cur), cur);
|
||||
printk(KERN_DEFAULT "Process %s (pid: %d, threadinfo %p, task %p)\n",
|
||||
cur->comm, cur->pid, task_thread_info(cur), cur);
|
||||
|
||||
/*
|
||||
* When in-kernel, we also print out the stack and code at the
|
||||
@@ -284,16 +284,16 @@ void show_regs(struct pt_regs *regs)
|
||||
for (i = 0; i < code_len; i++, ip++) {
|
||||
if (ip < (u8 *)PAGE_OFFSET ||
|
||||
probe_kernel_address(ip, c)) {
|
||||
printk(KERN_CONT " Bad RIP value.");
|
||||
pr_cont(" Bad RIP value.");
|
||||
break;
|
||||
}
|
||||
if (ip == (u8 *)regs->ip)
|
||||
printk(KERN_CONT "<%02x> ", c);
|
||||
pr_cont("<%02x> ", c);
|
||||
else
|
||||
printk(KERN_CONT "%02x ", c);
|
||||
pr_cont("%02x ", c);
|
||||
}
|
||||
}
|
||||
printk(KERN_CONT "\n");
|
||||
pr_cont("\n");
|
||||
}
|
||||
|
||||
int is_valid_bugaddr(unsigned long ip)
|
||||
|
Reference in New Issue
Block a user