arm64: ptrace: Use ARM64_SME to guard the SME register enumerations

Message ID 20221214135943.379-1-yuzenghui@huawei.com
State New
Headers
Series arm64: ptrace: Use ARM64_SME to guard the SME register enumerations |

Commit Message

Zenghui Yu Dec. 14, 2022, 1:59 p.m. UTC
  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>
---
 arch/arm64/kernel/ptrace.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Mark Brown Dec. 14, 2022, 2:55 p.m. UTC | #1
On Wed, Dec 14, 2022 at 09:59:43PM +0800, Zenghui Yu wrote:
> 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.

Reviewed-by: Mark Brown <broonie@kernel.org>
  
Will Deacon Jan. 5, 2023, 6:04 p.m. UTC | #2
On Wed, 14 Dec 2022 21:59:43 +0800, Zenghui Yu wrote:
> 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.
> 
> [...]

Applied to arm64 (for-next/fixes), thanks!

[1/1] arm64: ptrace: Use ARM64_SME to guard the SME register enumerations
      https://git.kernel.org/arm64/c/eb9a85261e29

Cheers,
  

Patch

diff --git a/arch/arm64/kernel/ptrace.c b/arch/arm64/kernel/ptrace.c
index 2686ab157601..0c321ad23cd3 100644
--- a/arch/arm64/kernel/ptrace.c
+++ b/arch/arm64/kernel/ptrace.c
@@ -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