OSDN Git Service

arm64/sysreg: Standardise naming of ID_AA64PFR1_EL1 BTI enumeration
authorMark Brown <broonie@kernel.org>
Mon, 5 Sep 2022 22:54:15 +0000 (23:54 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Fri, 9 Sep 2022 09:59:04 +0000 (10:59 +0100)
In preparation for automatic generation of constants update the define for
BTI being implemented to the convention we are using, no functional change.

Signed-off-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Kristina Martsenko <kristina.martsenko@arm.com>
Link: https://lore.kernel.org/r/20220905225425.1871461-19-broonie@kernel.org
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/include/asm/sysreg.h
arch/arm64/kernel/cpufeature.c

index aa1e970..05401a9 100644 (file)
 #define ID_AA64PFR1_EL1_SSBS_NI                0
 #define ID_AA64PFR1_EL1_SSBS_IMP       1
 #define ID_AA64PFR1_EL1_SSBS_SSBS2     2
-#define ID_AA64PFR1_EL1_BT_BTI         0x1
+#define ID_AA64PFR1_EL1_BT_IMP         0x1
 #define ID_AA64PFR1_EL1_SME            1
 
 #define ID_AA64PFR1_EL1_MTE_NI         0x0
index 636f6b2..5bf1587 100644 (file)
@@ -2530,7 +2530,7 @@ static const struct arm64_cpu_capabilities arm64_features[] = {
                .sys_reg = SYS_ID_AA64PFR1_EL1,
                .field_pos = ID_AA64PFR1_EL1_BT_SHIFT,
                .field_width = 4,
-               .min_field_value = ID_AA64PFR1_EL1_BT_BTI,
+               .min_field_value = ID_AA64PFR1_EL1_BT_IMP,
                .sign = FTR_UNSIGNED,
        },
 #endif
@@ -2741,7 +2741,7 @@ static const struct arm64_cpu_capabilities arm64_elf_hwcaps[] = {
 #endif
        HWCAP_CAP(SYS_ID_AA64PFR1_EL1, ID_AA64PFR1_EL1_SSBS_SHIFT, 4, FTR_UNSIGNED, ID_AA64PFR1_EL1_SSBS_SSBS2, CAP_HWCAP, KERNEL_HWCAP_SSBS),
 #ifdef CONFIG_ARM64_BTI
-       HWCAP_CAP(SYS_ID_AA64PFR1_EL1, ID_AA64PFR1_EL1_BT_SHIFT, 4, FTR_UNSIGNED, ID_AA64PFR1_EL1_BT_BTI, CAP_HWCAP, KERNEL_HWCAP_BTI),
+       HWCAP_CAP(SYS_ID_AA64PFR1_EL1, ID_AA64PFR1_EL1_BT_SHIFT, 4, FTR_UNSIGNED, ID_AA64PFR1_EL1_BT_IMP, CAP_HWCAP, KERNEL_HWCAP_BTI),
 #endif
 #ifdef CONFIG_ARM64_PTR_AUTH
        HWCAP_MULTI_CAP(ptr_auth_hwcap_addr_matches, CAP_HWCAP, KERNEL_HWCAP_PACA),