arm64: ptrace: Use ARM64_SME to guard the SME register enumerations
authorZenghui Yu <yuzenghui@huawei.com>
Wed, 14 Dec 2022 13:59:43 +0000 (21:59 +0800)
committerWill Deacon <will@kernel.org>
Thu, 5 Jan 2023 15:08:31 +0000 (15:08 +0000)
We currently guard REGSET_{SSVE, ZA} using ARM64_SVE for no good reason.
Both enumerations would be pointless without ARM64_SME and create two empty
entries in aarch64_regsets[] which would then become part of a process's
native regset view (they should be ignored though).

Switch to use ARM64_SME instead.

Fixes: e12310a0d30f ("arm64/sme: Implement ptrace support for streaming mode SVE registers")
Signed-off-by: Zenghui Yu <yuzenghui@huawei.com>
Reviewed-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20221214135943.379-1-yuzenghui@huawei.com
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/kernel/ptrace.c

index 2686ab15760173d1dc11805f579daf4d7e563ba5..0c321ad23cd3a48d60a52f3a0a1209c4b7218ac2 100644 (file)
@@ -1357,7 +1357,7 @@ enum aarch64_regset {
 #ifdef CONFIG_ARM64_SVE
        REGSET_SVE,
 #endif
-#ifdef CONFIG_ARM64_SVE
+#ifdef CONFIG_ARM64_SME
        REGSET_SSVE,
        REGSET_ZA,
 #endif