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 69D9DCCA479 for ; Mon, 20 Jun 2022 12:53:08 +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=lcw00qjU9X3Prkbh1tQfQI2LMHED/HfehNMpsdZ/aVY=; b=4z3/CImhLCHZ3g LpCGoZqeDV5DsIYyNOSltlsbC+gUQSL2BMnDHsTEDdF5ZaEinI2vRMgvWFH487LWRPxdZZL55jbgV VMZSocoMRV8okOt12K46+SJYmd5Oj6VxpeXPbefR6Pz9kulNw06JgjW+UOcNUmPSZdImgRJM0C+VS nIv1AZg09Cj4WBUD8WIZvlj/3zrz8aiVgNILOeMSUaExXj+BbGWBW81NGhJklIux1qsnEab963BO/ SgIxEh2t7f3Ofs9FRREf2q0XNlE6PDtCqWbRIVck4uJ/8vK1ONapcIS7fnqDVzxPAqllLmG+jqxjT jl4ApkJtPUiGwwJr7l9A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o3Gsb-000Yyn-89; Mon, 20 Jun 2022 12:51:46 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o3GlZ-000Vdj-3u for linux-arm-kernel@lists.infradead.org; Mon, 20 Jun 2022 12:44:31 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 958E1B810E8; Mon, 20 Jun 2022 12:44:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E6206C341C4; Mon, 20 Jun 2022 12:44:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1655729067; bh=6+0v1vxTP5tXwZfq4VzoklR4ncch3kLekJLZaVuFl/s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qw6Gbi8z+5R44HkAXdzRwM5LCFIyO2NhUdX3Y24kAWI+VKsHwhZhs61GKeLeG2dV/ aMkPusHiyeLwQkVF8TLTvZzZotRnjNmUpNeCca8bPQcmK2xsRhn8J3JbQFy8Gxfa16 o28d5tlVjPB4VH6dBqqsz1c+e0hqudXk91Dw8E+tyGAZT3vc5lHNRN7czTN8TIpIXN tqO04PqRxZsrXRWPX/yDDDxNjP9eVWsRfbNUMo7v6aHVmSO2JDavw47gJazhdu/rOf zWoMVansxlsaqa42CmgTH9G51ndUQmWjzrNYWdlZf5eblr1xx5RvSaHQL6bc8WQbsK 7TUKyIkMUEs7w== From: Mark Brown To: Catalin Marinas , Will Deacon Cc: Mark Rutland , Joey Gouly , linux-arm-kernel@lists.infradead.org, Mark Brown Subject: [PATCH v4 07/26] arm64/sysreg: Align pointer auth enumeration defines with architecture Date: Mon, 20 Jun 2022 13:43:48 +0100 Message-Id: <20220620124407.482398-8-broonie@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220620124407.482398-1-broonie@kernel.org> References: <20220620124407.482398-1-broonie@kernel.org> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=6271; h=from:subject; bh=6+0v1vxTP5tXwZfq4VzoklR4ncch3kLekJLZaVuFl/s=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBisGuHKp7khSg+ebUPsiYwdgUBdJX3b4Ep/QsjMevQ L/hJ8TGJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCYrBrhwAKCRAk1otyXVSH0H9TB/ 4y+PxmFvMfq2RPYhXnYYDoyBPJgXl0ZEQZuyBsBnQ625mX+Uwkkd+NQdD9XhTmN2ooZGZWoAL+dkTn qEHTcjyFWZjWMNRUrYkK0xdcqeZ+xC+CcTGrU4Nh39RHOaBqic8MVwPX7EZLwk329Hi6+E8zltPUKu gUFPw29VEA+cERpFWLnoZTuBkg3d1f1T8z6ci7yqjtDZz63nzW+YenR28DiGIxGAwpEAymy6RYc7zl 4bJgtbKZgKeIeGY9/U5IBAOX44NXICPNXDTfjgrKUqh4TVbW7M5f/XLF8LxBqLBKy3IqnEfUQ3Qe8L ZLTz7diiUcBhRqg0VoJU1+ZfuGo0di X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220620_054429_499390_5E02B5AC X-CRM114-Status: GOOD ( 13.65 ) 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 The defines used for the pointer authentication feature enumerations do not follow the naming convention we've decided to use where we name things after the architecture feature that introduced. Prepare for generating the defines for the ISA ID registers by updating to use the feature names. No functional changes. Signed-off-by: Mark Brown --- arch/arm64/include/asm/sysreg.h | 34 ++++++++++++++++----------------- arch/arm64/kernel/cpufeature.c | 24 +++++++++++------------ 2 files changed, 29 insertions(+), 29 deletions(-) diff --git a/arch/arm64/include/asm/sysreg.h b/arch/arm64/include/asm/sysreg.h index cd35b939f162..8120883b2b26 100644 --- a/arch/arm64/include/asm/sysreg.h +++ b/arch/arm64/include/asm/sysreg.h @@ -721,21 +721,21 @@ #define ID_AA64ISAR1_DPB_SHIFT 0 #define ID_AA64ISAR1_APA_NI 0x0 -#define ID_AA64ISAR1_APA_ARCHITECTED 0x1 +#define ID_AA64ISAR1_APA_PAuth 0x1 #define ID_AA64ISAR1_APA_ARCH_EPAC 0x2 -#define ID_AA64ISAR1_APA_ARCH_EPAC2 0x3 -#define ID_AA64ISAR1_APA_ARCH_EPAC2_FPAC 0x4 -#define ID_AA64ISAR1_APA_ARCH_EPAC2_FPAC_CMB 0x5 +#define ID_AA64ISAR1_APA_Pauth2 0x3 +#define ID_AA64ISAR1_APA_FPAC 0x4 +#define ID_AA64ISAR1_APA_FPACCOMBINE 0x5 #define ID_AA64ISAR1_API_NI 0x0 -#define ID_AA64ISAR1_API_IMP_DEF 0x1 -#define ID_AA64ISAR1_API_IMP_DEF_EPAC 0x2 -#define ID_AA64ISAR1_API_IMP_DEF_EPAC2 0x3 -#define ID_AA64ISAR1_API_IMP_DEF_EPAC2_FPAC 0x4 -#define ID_AA64ISAR1_API_IMP_DEF_EPAC2_FPAC_CMB 0x5 +#define ID_AA64ISAR1_API_PAuth 0x1 +#define ID_AA64ISAR1_API_EPAC 0x2 +#define ID_AA64ISAR1_API_PAuth2 0x3 +#define ID_AA64ISAR1_API_FPAC 0x4 +#define ID_AA64ISAR1_API_FPACCOMBINE 0x5 #define ID_AA64ISAR1_GPA_NI 0x0 -#define ID_AA64ISAR1_GPA_ARCHITECTED 0x1 +#define ID_AA64ISAR1_GPA_IMP 0x1 #define ID_AA64ISAR1_GPI_NI 0x0 -#define ID_AA64ISAR1_GPI_IMP_DEF 0x1 +#define ID_AA64ISAR1_GPI_IMP 0x1 /* id_aa64isar2 */ #define ID_AA64ISAR2_CLEARBHB_SHIFT 28 @@ -755,14 +755,14 @@ #define ID_AA64ISAR2_WFXT_SUPPORTED 0x2 #define ID_AA64ISAR2_APA3_NI 0x0 -#define ID_AA64ISAR2_APA3_ARCHITECTED 0x1 -#define ID_AA64ISAR2_APA3_ARCH_EPAC 0x2 -#define ID_AA64ISAR2_APA3_ARCH_EPAC2 0x3 -#define ID_AA64ISAR2_APA3_ARCH_EPAC2_FPAC 0x4 -#define ID_AA64ISAR2_APA3_ARCH_EPAC2_FPAC_CMB 0x5 +#define ID_AA64ISAR2_APA3_PAuth 0x1 +#define ID_AA64ISAR2_APA3_EPAC 0x2 +#define ID_AA64ISAR2_APA3_PAuth2 0x3 +#define ID_AA64ISAR2_APA3_FPAC 0x4 +#define ID_AA64ISAR2_APA3_FPACCOMBINE 0x5 #define ID_AA64ISAR2_GPA3_NI 0x0 -#define ID_AA64ISAR2_GPA3_ARCHITECTED 0x1 +#define ID_AA64ISAR2_GPA3_IMP 0x1 /* id_aa64pfr0 */ #define ID_AA64PFR0_CSV3_SHIFT 60 diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c index 7d838b5f7e20..838b3dcd8473 100644 --- a/arch/arm64/kernel/cpufeature.c +++ b/arch/arm64/kernel/cpufeature.c @@ -2317,7 +2317,7 @@ static const struct arm64_cpu_capabilities arm64_features[] = { .sign = FTR_UNSIGNED, .field_pos = ID_AA64ISAR1_APA_SHIFT, .field_width = 4, - .min_field_value = ID_AA64ISAR1_APA_ARCHITECTED, + .min_field_value = ID_AA64ISAR1_APA_PAuth, .matches = has_address_auth_cpucap, }, { @@ -2328,7 +2328,7 @@ static const struct arm64_cpu_capabilities arm64_features[] = { .sign = FTR_UNSIGNED, .field_pos = ID_AA64ISAR2_APA3_SHIFT, .field_width = 4, - .min_field_value = ID_AA64ISAR2_APA3_ARCHITECTED, + .min_field_value = ID_AA64ISAR2_APA3_PAuth, .matches = has_address_auth_cpucap, }, { @@ -2339,7 +2339,7 @@ static const struct arm64_cpu_capabilities arm64_features[] = { .sign = FTR_UNSIGNED, .field_pos = ID_AA64ISAR1_API_SHIFT, .field_width = 4, - .min_field_value = ID_AA64ISAR1_API_IMP_DEF, + .min_field_value = ID_AA64ISAR1_API_PAuth, .matches = has_address_auth_cpucap, }, { @@ -2355,7 +2355,7 @@ static const struct arm64_cpu_capabilities arm64_features[] = { .sign = FTR_UNSIGNED, .field_pos = ID_AA64ISAR1_GPA_SHIFT, .field_width = 4, - .min_field_value = ID_AA64ISAR1_GPA_ARCHITECTED, + .min_field_value = ID_AA64ISAR1_GPA_IMP, .matches = has_cpuid_feature, }, { @@ -2366,7 +2366,7 @@ static const struct arm64_cpu_capabilities arm64_features[] = { .sign = FTR_UNSIGNED, .field_pos = ID_AA64ISAR2_GPA3_SHIFT, .field_width = 4, - .min_field_value = ID_AA64ISAR2_GPA3_ARCHITECTED, + .min_field_value = ID_AA64ISAR2_GPA3_IMP, .matches = has_cpuid_feature, }, { @@ -2377,7 +2377,7 @@ static const struct arm64_cpu_capabilities arm64_features[] = { .sign = FTR_UNSIGNED, .field_pos = ID_AA64ISAR1_GPI_SHIFT, .field_width = 4, - .min_field_value = ID_AA64ISAR1_GPI_IMP_DEF, + .min_field_value = ID_AA64ISAR1_GPI_IMP, .matches = has_cpuid_feature, }, { @@ -2562,15 +2562,15 @@ static const struct arm64_cpu_capabilities ptr_auth_hwcap_addr_matches[] = { { HWCAP_CPUID_MATCH(SYS_ID_AA64ISAR1_EL1, ID_AA64ISAR1_APA_SHIFT, 4, FTR_UNSIGNED, - ID_AA64ISAR1_APA_ARCHITECTED) + ID_AA64ISAR1_APA_PAuth) }, { HWCAP_CPUID_MATCH(SYS_ID_AA64ISAR2_EL1, ID_AA64ISAR2_APA3_SHIFT, - 4, FTR_UNSIGNED, ID_AA64ISAR2_APA3_ARCHITECTED) + 4, FTR_UNSIGNED, ID_AA64ISAR2_APA3_PAuth) }, { HWCAP_CPUID_MATCH(SYS_ID_AA64ISAR1_EL1, ID_AA64ISAR1_API_SHIFT, - 4, FTR_UNSIGNED, ID_AA64ISAR1_API_IMP_DEF) + 4, FTR_UNSIGNED, ID_AA64ISAR1_API_PAuth) }, {}, }; @@ -2578,15 +2578,15 @@ static const struct arm64_cpu_capabilities ptr_auth_hwcap_addr_matches[] = { static const struct arm64_cpu_capabilities ptr_auth_hwcap_gen_matches[] = { { HWCAP_CPUID_MATCH(SYS_ID_AA64ISAR1_EL1, ID_AA64ISAR1_GPA_SHIFT, - 4, FTR_UNSIGNED, ID_AA64ISAR1_GPA_ARCHITECTED) + 4, FTR_UNSIGNED, ID_AA64ISAR1_GPA_IMP) }, { HWCAP_CPUID_MATCH(SYS_ID_AA64ISAR2_EL1, ID_AA64ISAR2_GPA3_SHIFT, - 4, FTR_UNSIGNED, ID_AA64ISAR2_GPA3_ARCHITECTED) + 4, FTR_UNSIGNED, ID_AA64ISAR2_GPA3_IMP) }, { HWCAP_CPUID_MATCH(SYS_ID_AA64ISAR1_EL1, ID_AA64ISAR1_GPI_SHIFT, - 4, FTR_UNSIGNED, ID_AA64ISAR1_GPI_IMP_DEF) + 4, FTR_UNSIGNED, ID_AA64ISAR1_GPI_IMP) }, {}, }; -- 2.30.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel