Commit 57f5b387 authored by Mark Rutland's avatar Mark Rutland Committed by Will Deacon
Browse files

FROMGIT: arm64/fpsimd: signal: Use SMSTOP behaviour in setup_return()



Historically the behaviour of setup_return() was nondeterministic,
depending on whether the task's FSIMD/SVE/SME state happened to be live.
We fixed most of that in commit:

  929fa99b ("arm64/fpsimd: signal: Always save+flush state early")

... but we didn't decide on how clearing PSTATE.SM should behave, and left a
TODO comment to that effect.

Use the new task_smstop_sm() helper to make this behave as if an SMSTOP
instruction was used to exit streaming mode. This would have been the
most common behaviour prior to the commit above.

Fixes: 40a8e87b ("arm64/sme: Disable ZA and streaming mode when handling signals")
Signed-off-by: default avatarMark Rutland <mark.rutland@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Marc Zyngier <maz@kernel.org>
Cc: Mark Brown <broonie@kernel.org>
Cc: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20250508132644.1395904-10-mark.rutland@arm.com


Signed-off-by: default avatarWill Deacon <will@kernel.org>
(cherry picked from commit 99560c94
 https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git


 for-next/sme-fixes)
Bug: 393087661
Signed-off-by: default avatarWill Deacon <willdeacon@google.com>
Change-Id: I25a3816b83fc83668d7c958515b0316262fedd7a
parent f940d322
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment