Thread (5 messages) flat view 5 messages, 1 author, 2016-11-02
STALE3566d

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

From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2016-11-02 11:21:07
Subsystem: linux for powerpc (32-bit and 64-bit), the rest · Maintainers: Madhavan Srinivasan, Linus Torvalds

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@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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help