Skip to content

Commit

Permalink
arm64/fpsimd: Sync FPSIMD state with SVE for SME only systems
Browse files Browse the repository at this point in the history
Currently we guard FPSIMD/SVE state conversions with a check for the system
supporting SVE but SME only systems may need to sync streaming mode SVE
state so add a check for SME support too.  These functions are only used
by the ptrace code.

Fixes: e12310a ("arm64/sme: Implement ptrace support for streaming mode SVE registers")
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20230803-arm64-fix-ptrace-ssve-no-sve-v1-2-49df214bfb3e@kernel.org
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
  • Loading branch information
broonie authored and ctmarinas committed Aug 4, 2023
1 parent 045aecd commit 507ea5d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/arm64/kernel/fpsimd.c
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,7 @@ static void fpsimd_to_sve(struct task_struct *task)
void *sst = task->thread.sve_state;
struct user_fpsimd_state const *fst = &task->thread.uw.fpsimd_state;

if (!system_supports_sve())
if (!system_supports_sve() && !system_supports_sme())
return;

vq = sve_vq_from_vl(thread_get_cur_vl(&task->thread));
Expand All @@ -705,7 +705,7 @@ static void sve_to_fpsimd(struct task_struct *task)
unsigned int i;
__uint128_t const *p;

if (!system_supports_sve())
if (!system_supports_sve() && !system_supports_sme())
return;

vl = thread_get_cur_vl(&task->thread);
Expand Down

0 comments on commit 507ea5d

Please sign in to comment.