From: Zhen Lei <thunder.leizhen@huawei.com>
To: Russell King <linux@armlinux.org.uk>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>, <patches@armlinux.org.uk>
Cc: Zhen Lei <thunder.leizhen@huawei.com>
Subject: [PATCH] ARM: Remove the special printing format of pc and lr in __show_regs()
Date: Mon, 1 Aug 2022 11:20:16 +0800 [thread overview]
Message-ID: <20220801032016.1524-1-thunder.leizhen@huawei.com> (raw)
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
next reply other threads:[~2022-08-01 3:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-01 3:20 Zhen Lei [this message]
2022-08-08 9:41 ` [PATCH] ARM: Remove the special printing format of pc and lr in __show_regs() Russell King (Oracle)
2022-08-09 2:09 ` Leizhen (ThunderTown)
2022-08-09 9:03 ` Leizhen (ThunderTown)
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=20220801032016.1524-1-thunder.leizhen@huawei.com \
--to=thunder.leizhen@huawei.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=patches@armlinux.org.uk \
/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).