Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp1740036imn; Sun, 31 Jul 2022 20:34:27 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uuXmDbRhEGaJCJM5GnKEaYAlAKfbdmangq78WPV9k9Q8SNo7ixqgKw7ooy4olFrTi9Nogo X-Received: by 2002:a17:907:6d26:b0:72b:3a72:a117 with SMTP id sa38-20020a1709076d2600b0072b3a72a117mr10919559ejc.280.1659324867078; Sun, 31 Jul 2022 20:34:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659324867; cv=none; d=google.com; s=arc-20160816; b=r0uyTXzDD53gIAMJnWBNwruCBNrDDBP64bMXJ49hCcnbekJ7HbF8NzSaCQiIFyMuLA lWD+DE+puH30EgxnSKSLxIf08HotJ7BY3NTTbobOigtvuZqSrIw9I55yJXRa5kzDmuF1 zWxWBadi49W8X9tLsJ2BNPpEaJjy3cupkz9ndqoRCoa0SK2Zs6F1nw7yYWayABI0W3No k5n8eH3k7j+gxds578ahEJNiH/xHdOG1rIjrMJ+PaDLQybA/M9AnIevGK0HyuwqRGXjQ WFbowjggHHEC5840qzr97HS0+n0bE73MzTFje+vtaDlwXKXxLUaBQtUDNttTby0Ig8CH CpFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=pTfM7YVdP77JSo8MA99JC3X6vWDkQq2MoMnhkn+ltJw=; b=pL7/iJoSZDYM9vguWz3YRGkSDPeaavTETYr4MqMl+TigD6GWqIF7k3fs7VeQNBQZd7 HCAQMIhV7zLVelxvPnw9wRSOBQsnBlHC5Piq7M3iHFRfLmf8jQifaxVpVKvoNQngxBhO 0LOqPCuitUCDItlk+Epx1RLzHsPDkWUc4mhfpjnwoxouImO5gcfz7snGCM/CBLmxFdlC kTMbmtPFxq5BFqzPkrVmXlLQeU1Is77LNDqfGqL4/GN8dLCjdXQAHs1PvrTS0bzQptSN 0wV4lau6SabYMjRHWVz3t0r+wmLry08evwTfxpGWX0WBylp0reEuAcxa6NmPNs/8QRl3 OP9Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sa6-20020a1709076d0600b0072a6bc9ae69si9417491ejc.980.2022.07.31.20.34.02; Sun, 31 Jul 2022 20:34:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239515AbiHADWx (ORCPT + 99 others); Sun, 31 Jul 2022 23:22:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52936 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238799AbiHADWt (ORCPT ); Sun, 31 Jul 2022 23:22:49 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0D2D465A1 for ; Sun, 31 Jul 2022 20:22:47 -0700 (PDT) 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 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII 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-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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); -- 2.25.1