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: Paul Burton <paul.burton@xxxxxxxxxx> --- Changes in v2: - Rebase atop v2 of patch 5 as requested by Ralf. --- arch/mips/kernel/traps.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c index 4aca484..00f3143 100644 --- a/arch/mips/kernel/traps.c +++ b/arch/mips/kernel/traps.c @@ -1096,6 +1096,8 @@ static int enable_restore_fp_context(int msa) if (msa && !err) { enable_msa(); _init_msa_upper(); + set_thread_flag(TIF_USEDMSA); + set_thread_flag(TIF_MSA_CTX_LIVE); } if (!err) set_used_math(); -- 2.0.2