diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2008-07-06 23:44:31 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2008-07-09 02:30:44 -0400 |
commit | 058c78f4ba89df7b2de82ac271452f09e2b8fa05 (patch) | |
tree | d6c70a7a1b3210daf7102cbad44590d38053f008 /arch/powerpc/kernel/process.c | |
parent | 3a4c6f0b1540811110a59112b4c83f55c229728c (diff) |
powerpc: Use new printk extension %pS to print symbols on oops
This changes the oops and backtrace code to use the new %pS
printk extension to print out symbols rather than manually
calling print_symbol.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel/process.c')
-rw-r--r-- | arch/powerpc/kernel/process.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index 85e557300d86..0a4eb0811590 100644 --- a/arch/powerpc/kernel/process.c +++ b/arch/powerpc/kernel/process.c | |||
@@ -485,10 +485,8 @@ void show_regs(struct pt_regs * regs) | |||
485 | * Lookup NIP late so we have the best change of getting the | 485 | * Lookup NIP late so we have the best change of getting the |
486 | * above info out without failing | 486 | * above info out without failing |
487 | */ | 487 | */ |
488 | printk("NIP ["REG"] ", regs->nip); | 488 | printk("NIP ["REG"] %pS\n", regs->nip, (void *)regs->nip); |
489 | print_symbol("%s\n", regs->nip); | 489 | printk("LR ["REG"] %pS\n", regs->link, (void *)regs->link); |
490 | printk("LR ["REG"] ", regs->link); | ||
491 | print_symbol("%s\n", regs->link); | ||
492 | #endif | 490 | #endif |
493 | show_stack(current, (unsigned long *) regs->gpr[1]); | 491 | show_stack(current, (unsigned long *) regs->gpr[1]); |
494 | if (!user_mode(regs)) | 492 | if (!user_mode(regs)) |
@@ -976,8 +974,7 @@ void show_stack(struct task_struct *tsk, unsigned long *stack) | |||
976 | newsp = stack[0]; | 974 | newsp = stack[0]; |
977 | ip = stack[STACK_FRAME_LR_SAVE]; | 975 | ip = stack[STACK_FRAME_LR_SAVE]; |
978 | if (!firstframe || ip != lr) { | 976 | if (!firstframe || ip != lr) { |
979 | printk("["REG"] ["REG"] ", sp, ip); | 977 | printk("["REG"] ["REG"] %pS", sp, ip, (void *)ip); |
980 | print_symbol("%s", ip); | ||
981 | if (firstframe) | 978 | if (firstframe) |
982 | printk(" (unreliable)"); | 979 | printk(" (unreliable)"); |
983 | printk("\n"); | 980 | printk("\n"); |
@@ -992,10 +989,9 @@ void show_stack(struct task_struct *tsk, unsigned long *stack) | |||
992 | && stack[STACK_FRAME_MARKER] == STACK_FRAME_REGS_MARKER) { | 989 | && stack[STACK_FRAME_MARKER] == STACK_FRAME_REGS_MARKER) { |
993 | struct pt_regs *regs = (struct pt_regs *) | 990 | struct pt_regs *regs = (struct pt_regs *) |
994 | (sp + STACK_FRAME_OVERHEAD); | 991 | (sp + STACK_FRAME_OVERHEAD); |
995 | printk("--- Exception: %lx", regs->trap); | ||
996 | print_symbol(" at %s\n", regs->nip); | ||
997 | lr = regs->link; | 992 | lr = regs->link; |
998 | print_symbol(" LR = %s\n", lr); | 993 | printk("--- Exception: %lx at %pS\n LR = %pS\n", |
994 | regs->trap, (void *)regs->nip, (void *)lr); | ||
999 | firstframe = 1; | 995 | firstframe = 1; |
1000 | } | 996 | } |
1001 | 997 | ||