diff options
author | Will Deacon <will.deacon@arm.com> | 2018-12-12 16:52:02 +0100 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2018-12-13 17:42:47 +0100 |
commit | a56005d3210500f8a166fcb83cbb5ac5d0f909e4 (patch) | |
tree | 3cf97e6a2144911231e414e6f44201a2b2c0cf02 /arch/arm64/include | |
parent | arm64: docs: document pointer authentication (diff) | |
download | linux-a56005d3210500f8a166fcb83cbb5ac5d0f909e4.tar.xz linux-a56005d3210500f8a166fcb83cbb5ac5d0f909e4.zip |
arm64: cpufeature: Reduce number of pointer auth CPU caps from 6 to 4
We can easily avoid defining the two meta-capabilities for the address
and generic keys, so remove them and instead just check both of the
architected and impdef capabilities when determining the level of system
support.
Reviewed-by: Suzuki Poulose <suzuki.poulose@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch/arm64/include')
-rw-r--r-- | arch/arm64/include/asm/cpucaps.h | 8 | ||||
-rw-r--r-- | arch/arm64/include/asm/cpufeature.h | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/arch/arm64/include/asm/cpucaps.h b/arch/arm64/include/asm/cpucaps.h index 803f388e81d4..82e9099834ae 100644 --- a/arch/arm64/include/asm/cpucaps.h +++ b/arch/arm64/include/asm/cpucaps.h @@ -58,11 +58,9 @@ #define ARM64_WORKAROUND_1165522 37 #define ARM64_HAS_ADDRESS_AUTH_ARCH 38 #define ARM64_HAS_ADDRESS_AUTH_IMP_DEF 39 -#define ARM64_HAS_ADDRESS_AUTH 40 -#define ARM64_HAS_GENERIC_AUTH_ARCH 41 -#define ARM64_HAS_GENERIC_AUTH_IMP_DEF 42 -#define ARM64_HAS_GENERIC_AUTH 43 +#define ARM64_HAS_GENERIC_AUTH_ARCH 40 +#define ARM64_HAS_GENERIC_AUTH_IMP_DEF 41 -#define ARM64_NCAPS 44 +#define ARM64_NCAPS 42 #endif /* __ASM_CPUCAPS_H */ diff --git a/arch/arm64/include/asm/cpufeature.h b/arch/arm64/include/asm/cpufeature.h index daec4b50d7fb..1e7fcd12b1c1 100644 --- a/arch/arm64/include/asm/cpufeature.h +++ b/arch/arm64/include/asm/cpufeature.h @@ -568,13 +568,15 @@ static inline bool system_supports_cnp(void) static inline bool system_supports_address_auth(void) { return IS_ENABLED(CONFIG_ARM64_PTR_AUTH) && - cpus_have_const_cap(ARM64_HAS_ADDRESS_AUTH); + (cpus_have_const_cap(ARM64_HAS_ADDRESS_AUTH_ARCH) || + cpus_have_const_cap(ARM64_HAS_ADDRESS_AUTH_IMP_DEF)); } static inline bool system_supports_generic_auth(void) { return IS_ENABLED(CONFIG_ARM64_PTR_AUTH) && - cpus_have_const_cap(ARM64_HAS_GENERIC_AUTH); + (cpus_have_const_cap(ARM64_HAS_GENERIC_AUTH_ARCH) || + cpus_have_const_cap(ARM64_HAS_GENERIC_AUTH_IMP_DEF)); } #define ARM64_SSBD_UNKNOWN -1 |