[PATCH 3/5] powerpc/oops: Fix printing of GPRs since KERN_CONT changes

Michael Ellerman mpe at ellerman.id.au
Wed Nov 2 22:20:48 AEDT 2016


Since the KERN_CONT changes our print out of the GPRs is messed up:

    GPR04:
    0000000000000001 c000000000155810
    0000000000000000 0000000000000001

    GPR08: 0000000000000007

Fix it for now by using pr_cont().

Signed-off-by: Michael Ellerman <mpe at ellerman.id.au>
---
 arch/powerpc/kernel/process.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
index 38f85d7a1e06..3898e381556f 100644
--- a/arch/powerpc/kernel/process.c
+++ b/arch/powerpc/kernel/process.c
@@ -1363,13 +1363,15 @@ void show_regs(struct pt_regs * regs)
 #endif
 
 	for (i = 0;  i < 32;  i++) {
-		if ((i % REGS_PER_LINE) == 0)
-			printk("\nGPR%02d: ", i);
-		printk(REG " ", regs->gpr[i]);
+		if ((i % REGS_PER_LINE) == 0) {
+			pr_cont("\n");
+			printk("GPR%02d: ", i);
+		}
+		pr_cont(REG " ", regs->gpr[i]);
 		if (i == LAST_VOLATILE && !FULL_REGS(regs))
 			break;
 	}
-	printk("\n");
+	pr_cont("\n");
 #ifdef CONFIG_KALLSYMS
 	/*
 	 * Lookup NIP late so we have the best change of getting the
-- 
2.7.4



More information about the Linuxppc-dev mailing list