diff options
author | 2014-07-31 14:53:16 +0100 | |
---|---|---|
committer | 2014-08-02 00:06:44 +0200 | |
commit | 732c0c3c70869af53654db2b56dffdd8d4df5211 (patch) | |
tree | e27283e34e5a2fb6d7e3ab88412eb8573b7c0c43 /arch/mips | |
parent | MIPS: init upper 64b of vector registers when MSA is first used (diff) | |
download | linux-732c0c3c70869af53654db2b56dffdd8d4df5211.tar.gz linux-732c0c3c70869af53654db2b56dffdd8d4df5211.tar.bz2 linux-732c0c3c70869af53654db2b56dffdd8d4df5211.zip |
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: Paul Burton <paul.burton@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/7500/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips')
-rw-r--r-- | arch/mips/kernel/traps.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c index 1ed84577d3e3..4716b89543a9 100644 --- a/arch/mips/kernel/traps.c +++ b/arch/mips/kernel/traps.c @@ -1097,6 +1097,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(); |