linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: Remove the special printing format of pc and lr in __show_regs()
@ 2022-08-01  3:20 Zhen Lei
  2022-08-08  9:41 ` Russell King (Oracle)
  0 siblings, 1 reply; 4+ messages in thread
From: Zhen Lei @ 2022-08-01  3:20 UTC (permalink / raw)
  To: Russell King, linux-arm-kernel, linux-kernel, patches; +Cc: Zhen Lei

Currently, instruction pointers are printed in [<%08lx>] format to make
them more visible. However, it is not necessary in __show_regs() because
they have the prefix 'pc :' or 'lr :', and it is also inconsistent with
that of other registers, which causes misalignment.

Before:
pc : [<8019a48c>]    lr : [<8019a48c>]    psr: 60000013
sp : c0965f28  ip : 00000001  fp : 00000001
r10: be6052d8  r9 : 431bde82  r8 : d7b634db

After:
pc : 8019a46c  lr : 8019a46c  psr: 60000013
sp : c8a71f28  ip : 00000001  fp : 00000002
r10: 1ef6a458  r9 : 431bde82  r8 : d7b634db

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
---
KernelVersion: v5.19
 arch/arm/kernel/process.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c
index 3d9cace63884013..3fb30d734c3568a 100644
--- a/arch/arm/kernel/process.c
+++ b/arch/arm/kernel/process.c
@@ -136,7 +136,7 @@ void __show_regs(struct pt_regs *regs)
 
 	printk("PC is at %pS\n", (void *)instruction_pointer(regs));
 	printk("LR is at %pS\n", (void *)regs->ARM_lr);
-	printk("pc : [<%08lx>]    lr : [<%08lx>]    psr: %08lx\n",
+	printk("pc : %08lx  lr : %08lx  psr: %08lx\n",
 	       regs->ARM_pc, regs->ARM_lr, regs->ARM_cpsr);
 	printk("sp : %08lx  ip : %08lx  fp : %08lx\n",
 	       regs->ARM_sp, regs->ARM_ip, regs->ARM_fp);
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-08-09  9:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-01  3:20 [PATCH] ARM: Remove the special printing format of pc and lr in __show_regs() Zhen Lei
2022-08-08  9:41 ` Russell King (Oracle)
2022-08-09  2:09   ` Leizhen (ThunderTown)
2022-08-09  9:03     ` Leizhen (ThunderTown)

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).