From patchwork Thu Feb 29 13:28:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jinjie Ruan X-Patchwork-Id: 13577135 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 5989BC54E41 for ; Thu, 29 Feb 2024 13:29:15 +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=tk7zA6PezihW260h0m5qeoBYTbdEsAdD+p3byfFdGdw=; b=paHUvxKy9l2xvi kN/E+l95pg/7leK1A+jEStSYEVbLCCBcfGbqcT7nSb35jS3+vkQfSdoSPuu5rY7dK/NQCMcWH2lJS 63EJ8TgdTWVddvvwBlNxTP2EHP3o/Mmepmt5siwE4dDiHEKh3RWVWwwFe3IyTr2+hyvrhaTZnMhuC gaBH3NrYMfj2bNK1vJQZP+pwRx0ZHZW0qPgKIiOHPjloq2n7C7IRTfZnpbkNqKetTcyZhSyt2SAwK Fc+z0FvquqXWxiaAaURfs1lkR5ykX7GO3VVJWSwbS+/d0sp9swHLIwlIp4Kn+vuzxMRDnR0zP7Ucx r2cEMrXamY4oZqgY6zGA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rfgTA-0000000DfEu-0vsV; Thu, 29 Feb 2024 13:29:04 +0000 Received: from szxga03-in.huawei.com ([45.249.212.189]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rfgSt-0000000Df8H-04U6 for linux-arm-kernel@lists.infradead.org; Thu, 29 Feb 2024 13:28:50 +0000 Received: from mail.maildlp.com (unknown [172.19.163.174]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4TlsTB2gf7zNlTt; Thu, 29 Feb 2024 21:27:10 +0800 (CST) Received: from kwepemi500008.china.huawei.com (unknown [7.221.188.139]) by mail.maildlp.com (Postfix) with ESMTPS id 275DD14037F; Thu, 29 Feb 2024 21:28:42 +0800 (CST) Received: from huawei.com (10.90.53.73) by kwepemi500008.china.huawei.com (7.221.188.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Thu, 29 Feb 2024 21:28:41 +0800 From: Jinjie Ruan To: , , , , , , , , , , , CC: Subject: [PATCH 2/2] arm64: Rename disable_daif to disable_all_int Date: Thu, 29 Feb 2024 21:28:02 +0800 Message-ID: <20240229132802.1682026-3-ruanjinjie@huawei.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240229132802.1682026-1-ruanjinjie@huawei.com> References: <20240229132802.1682026-1-ruanjinjie@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.90.53.73] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To kwepemi500008.china.huawei.com (7.221.188.139) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240229_052847_335218_F5187A1E X-CRM114-Status: GOOD ( 10.78 ) 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 As commit 0fbeb3187548 ("arm64: explicitly mask all exceptions") said, the disable_daif macro is used to make it clear to 'mask all exceptions'. However, if ALLINT is introduced by FEAT_NMI, DAIF and ALLINT should be set to mask IRQs and NMIs, the disable_daif name is not appropriate, so rename it to disable_all_int in all places. Signed-off-by: Jinjie Ruan --- arch/arm64/include/asm/assembler.h | 2 +- arch/arm64/kernel/entry.S | 2 +- arch/arm64/mm/proc.S | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm64/include/asm/assembler.h b/arch/arm64/include/asm/assembler.h index ab8b396428da..b93916594e8a 100644 --- a/arch/arm64/include/asm/assembler.h +++ b/arch/arm64/include/asm/assembler.h @@ -34,7 +34,7 @@ wx\n .req w\n .endr - .macro disable_daif + .macro disable_all_int msr daifset, #0xf .endm diff --git a/arch/arm64/kernel/entry.S b/arch/arm64/kernel/entry.S index 7ef0e127b149..cb12003120ef 100644 --- a/arch/arm64/kernel/entry.S +++ b/arch/arm64/kernel/entry.S @@ -334,7 +334,7 @@ alternative_else_nop_endif .macro kernel_exit, el .if \el != 0 - disable_daif + disable_all_int .endif #ifdef CONFIG_ARM64_PSEUDO_NMI diff --git a/arch/arm64/mm/proc.S b/arch/arm64/mm/proc.S index bfd2ad896108..4cd5558c5957 100644 --- a/arch/arm64/mm/proc.S +++ b/arch/arm64/mm/proc.S @@ -142,7 +142,7 @@ SYM_FUNC_START(cpu_do_resume) * exception. Mask them until local_daif_restore() in cpu_suspend() * resets them. */ - disable_daif + disable_all_int msr mdscr_el1, x10 msr sctlr_el1, x12