[PATCH 4/5] powerpc/oops: Move printing of SOFTE before CFAR
Michael Ellerman
mpe at ellerman.id.au
Wed Nov 2 22:20:49 AEDT 2016
Now that KERN_CONT is required to do continuation lines properly, our
oops output is messed up.
But as the code is currently written we can't actually use pr_cont()
correctly, because some of the output may or may not be a continuation
line, depending on what was printed previously.
So move the printing of SOFTE up, so that we always have a line to
continue (at least on 64-bit). While we're at it, pull the CFAR logic
inside the #ifdef PPC64, CFAR is 64-bit only.
Signed-off-by: Michael Ellerman <mpe at ellerman.id.au>
---
arch/powerpc/kernel/process.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
index 3898e381556f..84d334527fcd 100644
--- a/arch/powerpc/kernel/process.c
+++ b/arch/powerpc/kernel/process.c
@@ -1346,17 +1346,17 @@ void show_regs(struct pt_regs * regs)
print_msr_bits(regs->msr);
printk(" CR: %08lx XER: %08lx\n", regs->ccr, regs->xer);
trap = TRAP(regs);
+#ifdef CONFIG_PPC64
+ printk("SOFTE: %ld ", regs->softe);
if ((regs->trap != 0xc00) && cpu_has_feature(CPU_FTR_CFAR))
printk("CFAR: "REG" ", regs->orig_gpr3);
+#endif
if (trap == 0x200 || trap == 0x300 || trap == 0x600)
#if defined(CONFIG_4xx) || defined(CONFIG_BOOKE)
printk("DEAR: "REG" ESR: "REG" ", regs->dar, regs->dsisr);
#else
printk("DAR: "REG" DSISR: %08lx ", regs->dar, regs->dsisr);
#endif
-#ifdef CONFIG_PPC64
- printk("SOFTE: %ld ", regs->softe);
-#endif
#ifdef CONFIG_PPC_TRANSACTIONAL_MEM
if (MSR_TM_ACTIVE(regs->msr))
printk("\nPACATMSCRATCH: %016llx ", get_paca()->tm_scratch);
--
2.7.4
More information about the Linuxppc-dev
mailing list