diff options
author | Mark Brown <broonie@kernel.org> | 2023-01-16 17:04:43 +0100 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2023-01-20 13:23:06 +0100 |
commit | d4913eee152d3ffaf9a1e70073bc15e773625685 (patch) | |
tree | 102888dc7da934eaa3a3ef32a2e3a8b02a038a51 /arch/arm64/include/asm/cpufeature.h | |
parent | arm64/sme: Enable host kernel to access ZT0 (diff) | |
download | linux-d4913eee152d3ffaf9a1e70073bc15e773625685.tar.xz linux-d4913eee152d3ffaf9a1e70073bc15e773625685.zip |
arm64/sme: Add basic enumeration for SME2
Add basic feature detection for SME2, detecting that the feature is present
and disabling traps for ZT0.
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20221208-arm64-sme2-v4-8-f2fa0aef982f@kernel.org
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm64/include/asm/cpufeature.h')
-rw-r--r-- | arch/arm64/include/asm/cpufeature.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/arm64/include/asm/cpufeature.h b/arch/arm64/include/asm/cpufeature.h index 03d1c9d7af82..fc2c739f48f1 100644 --- a/arch/arm64/include/asm/cpufeature.h +++ b/arch/arm64/include/asm/cpufeature.h @@ -769,6 +769,12 @@ static __always_inline bool system_supports_sme(void) cpus_have_const_cap(ARM64_SME); } +static __always_inline bool system_supports_sme2(void) +{ + return IS_ENABLED(CONFIG_ARM64_SME) && + cpus_have_const_cap(ARM64_SME2); +} + static __always_inline bool system_supports_fa64(void) { return IS_ENABLED(CONFIG_ARM64_SME) && |