From mboxrd@z Thu Jan 1 00:00:00 1970 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 E7B00C433F5 for ; Wed, 12 Jan 2022 03:24:54 +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:References:In-Reply-To: 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: List-Owner; bh=CN180DjeiJ9xyOzrxMjf7uKKANDYG9ScnWYKMZWjnMI=; b=U/dFQqrP+4uB1o BUJQih090B5kok9foRlju95TnGf/TccALwxTm6bC8JSeMmcNR8AMf8ixNPK+3TbPr+JBI1J6NyoIU 7u+NUnuu5zJdNrxbXjvfJ0Z9P5ST1X38kXJNRbugNzs8iatLQggisS695QNAvulw/9oMoVZvZVc1c q5E4KZvReSp1C3wI8X33d6UPAAtWLYiwBAZrpSVG0wyG0W+rthWjnTyJkXJMdqtbxV3o1vaB/a7F/ cVm8XSCEs1o6uSavUMEKtT7ahY7hFc3oYipoC44wvF3qfwWFsRY3x1h45D5g496wx8DcKZcR7FSzl GffCv+LREQ/5wHCh3p4A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n7UEg-0011Eh-Th; Wed, 12 Jan 2022 03:23:43 +0000 Received: from szxga03-in.huawei.com ([45.249.212.189]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1n7UEc-0011E2-He for linux-arm-kernel@lists.infradead.org; Wed, 12 Jan 2022 03:23:40 +0000 Received: from dggeme706-chm.china.huawei.com (unknown [172.30.72.57]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4JYXrj2k2rz8wHk; Wed, 12 Jan 2022 11:20:53 +0800 (CST) Received: from huawei.com (10.67.174.47) by dggeme706-chm.china.huawei.com (10.1.199.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.20; Wed, 12 Jan 2022 11:23:35 +0800 From: He Ying To: , , , , , , CC: , , Subject: [PATCH] arm64: entry: Save some nops when CONFIG_ARM64_PSEUDO_NMI is not set Date: Tue, 11 Jan 2022 22:24:10 -0500 Message-ID: <20220112032410.29231-1-heying24@huawei.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220107085536.214501-1-heying24@huawei.com> References: <20220107085536.214501-1-heying24@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.67.174.47] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To dggeme706-chm.china.huawei.com (10.1.199.102) X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220111_192338_770639_34AADFF7 X-CRM114-Status: UNSURE ( 8.10 ) X-CRM114-Notice: Please train this message. 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Arm64 pseudo-NMI feature code brings some additional nops when CONFIG_ARM64_PSEUDO_NMI is not set, which is not necessary. So add necessary ifdeffery to avoid it. Signed-off-by: He Ying --- arch/arm64/kernel/entry.S | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm64/kernel/entry.S b/arch/arm64/kernel/entry.S index 2f69ae43941d..ffc32d3d909a 100644 --- a/arch/arm64/kernel/entry.S +++ b/arch/arm64/kernel/entry.S @@ -300,6 +300,7 @@ alternative_else_nop_endif str w21, [sp, #S_SYSCALLNO] .endif +#ifdef CONFIG_ARM64_PSEUDO_NMI /* Save pmr */ alternative_if ARM64_HAS_IRQ_PRIO_MASKING mrs_s x20, SYS_ICC_PMR_EL1 @@ -307,6 +308,7 @@ alternative_if ARM64_HAS_IRQ_PRIO_MASKING mov x20, #GIC_PRIO_IRQON | GIC_PRIO_PSR_I_SET msr_s SYS_ICC_PMR_EL1, x20 alternative_else_nop_endif +#endif /* Re-enable tag checking (TCO set on exception entry) */ #ifdef CONFIG_ARM64_MTE @@ -330,6 +332,7 @@ alternative_else_nop_endif disable_daif .endif +#ifdef CONFIG_ARM64_PSEUDO_NMI /* Restore pmr */ alternative_if ARM64_HAS_IRQ_PRIO_MASKING ldr x20, [sp, #S_PMR_SAVE] @@ -339,6 +342,7 @@ alternative_if ARM64_HAS_IRQ_PRIO_MASKING dsb sy // Ensure priority change is seen by redistributor .L__skip_pmr_sync\@: alternative_else_nop_endif +#endif ldp x21, x22, [sp, #S_PC] // load ELR, SPSR -- 2.17.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel