diff options
author | Ira Snyder <iws@ovro.caltech.edu> | 2012-01-06 07:34:07 -0500 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2012-02-16 00:11:23 -0500 |
commit | 40c8cefaaf12734327db7199a56e60058d98e7b6 (patch) | |
tree | 639b20e1e2229f3bcc03c5ef92dcfa7ca784cd65 /arch/powerpc/kernel/process.c | |
parent | 778a785f02ad846446e91dab49331bd7d853c514 (diff) |
powerpc: Fix kernel log of oops/panic instruction dump
A kernel oops/panic prints an instruction dump showing several
instructions before and after the instruction which caused the
oops/panic.
The code intended that the faulting instruction be enclosed in angle
brackets, however a bug caused the faulting instruction to be
interpreted by printk() as the message log level.
To fix this, the KERN_CONT log level is added before the actual text of
the printed message.
=== Before the patch ===
[ 1081.587266] Instruction dump:
[ 1081.590236] 7c000110 7c0000f8 5400077c 552907f6 7d290378 992b0003 4e800020 38000001
[ 1081.598034] 3d20c03a 9009a114 7c0004ac 39200000
[ 1081.602500] 4e800020 3803ffd0 2b800009
<4>[ 1081.587266] Instruction dump:
<4>[ 1081.590236] 7c000110 7c0000f8 5400077c 552907f6 7d290378 992b0003 4e800020 38000001
<4>[ 1081.598034] 3d20c03a 9009a114 7c0004ac 39200000
<98090000>[ 1081.602500] 4e800020 3803ffd0 2b800009
=== After the patch ===
[ 51.385216] Instruction dump:
[ 51.388186] 7c000110 7c0000f8 5400077c 552907f6 7d290378 992b0003 4e800020 38000001
[ 51.395986] 3d20c03a 9009a114 7c0004ac 39200000 <98090000> 4e800020 3803ffd0 2b800009
<4>[ 51.385216] Instruction dump:
<4>[ 51.388186] 7c000110 7c0000f8 5400077c 552907f6 7d290378 992b0003 4e800020 38000001
<4>[ 51.395986] 3d20c03a 9009a114 7c0004ac 39200000 <98090000> 4e800020 3803ffd0 2b800009
Signed-off-by: Ira W. Snyder <iws@ovro.caltech.edu>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linuxppc-dev@lists.ozlabs.org
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 | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index ebe5766781aa..d817ab018486 100644 --- a/arch/powerpc/kernel/process.c +++ b/arch/powerpc/kernel/process.c | |||
@@ -566,12 +566,12 @@ static void show_instructions(struct pt_regs *regs) | |||
566 | */ | 566 | */ |
567 | if (!__kernel_text_address(pc) || | 567 | if (!__kernel_text_address(pc) || |
568 | __get_user(instr, (unsigned int __user *)pc)) { | 568 | __get_user(instr, (unsigned int __user *)pc)) { |
569 | printk("XXXXXXXX "); | 569 | printk(KERN_CONT "XXXXXXXX "); |
570 | } else { | 570 | } else { |
571 | if (regs->nip == pc) | 571 | if (regs->nip == pc) |
572 | printk("<%08x> ", instr); | 572 | printk(KERN_CONT "<%08x> ", instr); |
573 | else | 573 | else |
574 | printk("%08x ", instr); | 574 | printk(KERN_CONT "%08x ", instr); |
575 | } | 575 | } |
576 | 576 | ||
577 | pc += sizeof(int); | 577 | pc += sizeof(int); |