From patchwork Mon Aug 1 03:20:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Leizhen (ThunderTown)" X-Patchwork-Id: 12933360 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E4024C00144 for ; Mon, 1 Aug 2022 03:24:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:CC :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=LNSfA54L79ga7lYwXHYpKcc7tNmdbfJrjQtxa46HZbQ=; b=zG4UxN/P74Zj1n dCLESly0L0vw4o0wVqXrMVjsL2r1BHhl+BjWxd7M1Bv8A2vV3NtVN13IRRtGfzlpyYtkXmqZ8FEbh wypXE+2uUuIyVkOqRAVVXRA90901Jgz3KBtujirrKJK2GTBUFUdrDuAdWUpPPIujsjdiY8XdOa8qP IP7SK08qppEmB1x3Xywvpffdh4WjUAsLnUMuiKxDwq8hZjvq8iYKpXDGxaNlmDvCCpTXhAcsxueKS sfqcAjnJD9aDUFk8ZWgQeOVzzMtk8j8SC2+14YC2itWfJ95h6BOKTq9k1IY3GeNVByZ4STQKRHYia BZuSTgGKzUbF4vRNVjnQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oIM1D-001C1v-1A; Mon, 01 Aug 2022 03:22:59 +0000 Received: from szxga01-in.huawei.com ([45.249.212.187]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oIM18-001BuJ-UK for linux-arm-kernel@lists.infradead.org; Mon, 01 Aug 2022 03:22:56 +0000 Received: from dggpemm500022.china.huawei.com (unknown [172.30.72.54]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4Lx3Jd1FBJzjXfc; Mon, 1 Aug 2022 11:19:45 +0800 (CST) Received: from dggpemm500006.china.huawei.com (7.185.36.236) by dggpemm500022.china.huawei.com (7.185.36.162) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Mon, 1 Aug 2022 11:22:44 +0800 Received: from thunder-town.china.huawei.com (10.174.178.55) by dggpemm500006.china.huawei.com (7.185.36.236) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Mon, 1 Aug 2022 11:22:44 +0800 From: Zhen Lei To: Russell King , , , CC: Zhen Lei Subject: [PATCH] ARM: Remove the special printing format of pc and lr in __show_regs() Date: Mon, 1 Aug 2022 11:20:16 +0800 Message-ID: <20220801032016.1524-1-thunder.leizhen@huawei.com> X-Mailer: git-send-email 2.26.0.windows.1 MIME-Version: 1.0 X-Originating-IP: [10.174.178.55] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To dggpemm500006.china.huawei.com (7.185.36.236) X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220731_202255_181651_FEA33F7C X-CRM114-Status: GOOD ( 10.33 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 --- 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);