提交 732c0c3c 编写于 作者: P Paul Burton 提交者: Ralf Baechle

MIPS: fix MSA context for tasks which don't use FP first

If a task does not execute scalar FP instructions prior to using MSA
then the flags indicating that the task has live MSA context were not
being set. The upper 64b of each vector register would then be lost
upon the tasks first context switch after using MSA.
Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/7500/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
上级 c9017757
...@@ -1097,6 +1097,8 @@ static int enable_restore_fp_context(int msa) ...@@ -1097,6 +1097,8 @@ static int enable_restore_fp_context(int msa)
if (msa && !err) { if (msa && !err) {
enable_msa(); enable_msa();
_init_msa_upper(); _init_msa_upper();
set_thread_flag(TIF_USEDMSA);
set_thread_flag(TIF_MSA_CTX_LIVE);
} }
if (!err) if (!err)
set_used_math(); set_used_math();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册