Skip to content

Commit bbc6172

Browse files
brooniewilldeacon
authored andcommitted
arm64/fpsimd: SME no longer requires SVE register state
Now that we track the type of the stored register state separately to what is active in the task, it is valid to have the FPSIMD register state stored while in streaming mode. Remove the special case handling for SME when setting FPSIMD register state. Signed-off-by: Mark Brown <[email protected]> Reviewed-by: Catalin Marinas <[email protected]> Reviewed-by: Marc Zyngier <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
1 parent a0136be commit bbc6172

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

arch/arm64/kernel/fpsimd.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -815,8 +815,7 @@ void fpsimd_sync_to_sve(struct task_struct *task)
815815
*/
816816
void sve_sync_to_fpsimd(struct task_struct *task)
817817
{
818-
if (test_tsk_thread_flag(task, TIF_SVE) ||
819-
thread_sm_enabled(&task->thread))
818+
if (task->thread.fp_type == FP_STATE_SVE)
820819
sve_to_fpsimd(task);
821820
}
822821

arch/arm64/kernel/ptrace.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -907,8 +907,6 @@ static int sve_set_common(struct task_struct *target,
907907
ret = __fpr_set(target, regset, pos, count, kbuf, ubuf,
908908
SVE_PT_FPSIMD_OFFSET);
909909
clear_tsk_thread_flag(target, TIF_SVE);
910-
if (type == ARM64_VEC_SME)
911-
fpsimd_force_sync_to_sve(target);
912910
target->thread.fp_type = FP_STATE_FPSIMD;
913911
goto out;
914912
}

0 commit comments

Comments
 (0)