提交 bbc6172e 编写于 作者: M Mark Brown 提交者: Will Deacon

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: NMark Brown <broonie@kernel.org>
Reviewed-by: NCatalin Marinas <catalin.marinas@arm.com>
Reviewed-by: NMarc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20221115094640.112848-7-broonie@kernel.orgSigned-off-by: NWill Deacon <will@kernel.org>
上级 a0136be4
...@@ -815,8 +815,7 @@ void fpsimd_sync_to_sve(struct task_struct *task) ...@@ -815,8 +815,7 @@ void fpsimd_sync_to_sve(struct task_struct *task)
*/ */
void sve_sync_to_fpsimd(struct task_struct *task) void sve_sync_to_fpsimd(struct task_struct *task)
{ {
if (test_tsk_thread_flag(task, TIF_SVE) || if (task->thread.fp_type == FP_STATE_SVE)
thread_sm_enabled(&task->thread))
sve_to_fpsimd(task); sve_to_fpsimd(task);
} }
......
...@@ -907,8 +907,6 @@ static int sve_set_common(struct task_struct *target, ...@@ -907,8 +907,6 @@ static int sve_set_common(struct task_struct *target,
ret = __fpr_set(target, regset, pos, count, kbuf, ubuf, ret = __fpr_set(target, regset, pos, count, kbuf, ubuf,
SVE_PT_FPSIMD_OFFSET); SVE_PT_FPSIMD_OFFSET);
clear_tsk_thread_flag(target, TIF_SVE); clear_tsk_thread_flag(target, TIF_SVE);
if (type == ARM64_VEC_SME)
fpsimd_force_sync_to_sve(target);
target->thread.fp_type = FP_STATE_FPSIMD; target->thread.fp_type = FP_STATE_FPSIMD;
goto out; goto out;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册