]> git.baikalelectronics.ru Git - kernel.git/commit
MIPS: add missing MSACSR and upper MSA initialization
authorHuang Pei <huangpei@loongson.cn>
Tue, 1 Sep 2020 06:53:09 +0000 (14:53 +0800)
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>
Thu, 3 Sep 2020 10:00:03 +0000 (12:00 +0200)
commit8370e417c306dc9f0a37f0dc50afa1879a705c3a
tree71e7c8aa6a0d3ac586befa5c3b23398aa7ce809d
parent73db8e5dce5ae5ae8c325babaf08a3d74c696008
MIPS: add missing MSACSR and upper MSA initialization

In ff8801728ee8 ("MIPS: Simplify FP context initialization), init_fp_ctx
just initialize the fp/msa context, and own_fp_inatomic just restore
FCSR and 64bit FP regs from it, but miss MSACSR and upper MSA regs for
MSA, so MSACSR and MSA upper regs's value from previous task on current
cpu can leak into current task and cause unpredictable behavior when MSA
context not initialized.

Fixes: ff8801728ee8 ("MIPS: Simplify FP context initialization")
Signed-off-by: Huang Pei <huangpei@loongson.cn>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
arch/mips/kernel/traps.c