linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert+renesas@glider.be>
To: Yoshinori Sato <ysato@users.sourceforge.jp>,
	Rich Felker <dalias@libc.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Mike Rapoport <rppt@linux.ibm.com>,
	Dmitry Safonov <0x7f454c46@gmail.com>,
	Guenter Roeck <linux@roeck-us.net>,
	linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org,
	Geert Uytterhoeven <geert+renesas@glider.be>
Subject: [PATCH v2 6/9] sh: process: Fix broken lines in register dumps
Date: Wed, 17 Jun 2020 16:36:36 +0200	[thread overview]
Message-ID: <20200617143639.18315-7-geert+renesas@glider.be> (raw)
In-Reply-To: <20200617143639.18315-1-geert+renesas@glider.be>

Rejoin the broken lines by using pr_cont().
Convert the remaining printk() calls to pr_*() while at it.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Tested-by: Guenter Roeck <linux@roeck-us.net>
---
v2:
  - Add Tested-by.

Sample impact:

 PC is at dma_alloc_attrs+0x32/0xb0
 PR is at platform_resource_setup_memory+0xbc/0x150
-PC  : 8c043d06 SP  : 8f41fe9c SR  : 40000001
-TEA : 00000000
-R0  : 8c043cd4 R1  : 00000000 R2  : 00000000 R3  : 8c213e7c
+PC  : 8c043cfa SP  : 8f41fe9c SR  : 40000001 TEA : 8c00369e
+R0  : 8c043cc8 R1  : 00000000 R2  : 00000000 R3  : 8c213e7c
 R4  : 8c29cc38 R5  : 00100000 R6  : 8f41fecc R7  : 00000cc0
 R8  : 8c29cc38 R9  : 8c29720c R10 : 00000cc0 R11 : 00100000
-R12 : 00000000 R13 : 8f41fecc R14 : 8c274773
-MACH: 00000001 MACL: b16b1ded GBR : 09102e96 PR  : 8c2c0524
+R12 : 00000000 R13 : 8f41fecc R14 : 8c27479f
+MACH: 00000001 MACL: b16b1ded GBR : 004c5450 PR  : 8c2c0524
---
 arch/sh/kernel/process_32.c | 38 +++++++++++++++++--------------------
 1 file changed, 17 insertions(+), 21 deletions(-)

diff --git a/arch/sh/kernel/process_32.c b/arch/sh/kernel/process_32.c
index 456cc8d171f7258a..049f11a5f9abae7a 100644
--- a/arch/sh/kernel/process_32.c
+++ b/arch/sh/kernel/process_32.c
@@ -30,34 +30,30 @@
 
 void show_regs(struct pt_regs * regs)
 {
-	printk("\n");
+	pr_info("\n");
 	show_regs_print_info(KERN_DEFAULT);
 
-	printk("PC is at %pS\n", (void *)instruction_pointer(regs));
-	printk("PR is at %pS\n", (void *)regs->pr);
+	pr_info("PC is at %pS\n", (void *)instruction_pointer(regs));
+	pr_info("PR is at %pS\n", (void *)regs->pr);
 
-	printk("PC  : %08lx SP  : %08lx SR  : %08lx ",
-	       regs->pc, regs->regs[15], regs->sr);
+	pr_info("PC  : %08lx SP  : %08lx SR  : %08lx ", regs->pc,
+		regs->regs[15], regs->sr);
 #ifdef CONFIG_MMU
-	printk("TEA : %08x\n", __raw_readl(MMU_TEA));
+	pr_cont("TEA : %08x\n", __raw_readl(MMU_TEA));
 #else
-	printk("\n");
+	pr_cont("\n");
 #endif
 
-	printk("R0  : %08lx R1  : %08lx R2  : %08lx R3  : %08lx\n",
-	       regs->regs[0],regs->regs[1],
-	       regs->regs[2],regs->regs[3]);
-	printk("R4  : %08lx R5  : %08lx R6  : %08lx R7  : %08lx\n",
-	       regs->regs[4],regs->regs[5],
-	       regs->regs[6],regs->regs[7]);
-	printk("R8  : %08lx R9  : %08lx R10 : %08lx R11 : %08lx\n",
-	       regs->regs[8],regs->regs[9],
-	       regs->regs[10],regs->regs[11]);
-	printk("R12 : %08lx R13 : %08lx R14 : %08lx\n",
-	       regs->regs[12],regs->regs[13],
-	       regs->regs[14]);
-	printk("MACH: %08lx MACL: %08lx GBR : %08lx PR  : %08lx\n",
-	       regs->mach, regs->macl, regs->gbr, regs->pr);
+	pr_info("R0  : %08lx R1  : %08lx R2  : %08lx R3  : %08lx\n",
+		regs->regs[0], regs->regs[1], regs->regs[2], regs->regs[3]);
+	pr_info("R4  : %08lx R5  : %08lx R6  : %08lx R7  : %08lx\n",
+		regs->regs[4], regs->regs[5], regs->regs[6], regs->regs[7]);
+	pr_info("R8  : %08lx R9  : %08lx R10 : %08lx R11 : %08lx\n",
+		regs->regs[8], regs->regs[9], regs->regs[10], regs->regs[11]);
+	pr_info("R12 : %08lx R13 : %08lx R14 : %08lx\n",
+		regs->regs[12], regs->regs[13], regs->regs[14]);
+	pr_info("MACH: %08lx MACL: %08lx GBR : %08lx PR  : %08lx\n",
+		regs->mach, regs->macl, regs->gbr, regs->pr);
 
 	show_trace(NULL, (unsigned long *)regs->regs[15], regs, KERN_DEFAULT);
 	show_code(regs);
-- 
2.17.1


  parent reply	other threads:[~2020-06-17 14:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-17 14:36 [PATCH v2 0/9] sh: Modernize printing of kernel messages Geert Uytterhoeven
2020-06-17 14:36 ` [PATCH v2 1/9] sh: fault: Fix duplicate printing of "PC:" Geert Uytterhoeven
2020-06-17 14:36 ` [PATCH v2 2/9] Revert "sh: add loglvl to printk_address()" Geert Uytterhoeven
2020-06-17 14:36 ` [PATCH v2 3/9] Revert "sh: remove needless printk()" Geert Uytterhoeven
2020-06-17 14:36 ` [PATCH v2 4/9] sh: kernel: disassemble: Fix broken lines in disassembly dumps Geert Uytterhoeven
2020-06-17 14:36 ` [PATCH v2 5/9] sh: dump_stack: Fix broken lines and ptrval in calltrace dumps Geert Uytterhoeven
2020-06-17 14:36 ` Geert Uytterhoeven [this message]
2020-06-17 14:36 ` [PATCH v2 7/9] sh: sh2007: Modernize printing of kernel messages Geert Uytterhoeven
2020-06-17 14:36 ` [PATCH v2 8/9] sh: pci: " Geert Uytterhoeven
2020-06-17 14:36 ` [PATCH v2 9/9] sh: machvec: " Geert Uytterhoeven

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200617143639.18315-7-geert+renesas@glider.be \
    --to=geert+renesas@glider.be \
    --cc=0x7f454c46@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=dalias@libc.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=rppt@linux.ibm.com \
    --cc=ysato@users.sourceforge.jp \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).