提交 d6e41525 编写于 作者: D David Daney 提交者: Ralf Baechle

MIPS: OCTEON: Fix FP context save.

It wasn't being saved on task switch.
Signed-off-by: NDavid Daney <david.daney@cavium.com>
Signed-off-by: NAleksey Makarov <aleksey.makarov@auriga.com>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/8934/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
上级 ac655fb7
...@@ -31,15 +31,11 @@ ...@@ -31,15 +31,11 @@
/* /*
* check if we need to save FPU registers * check if we need to save FPU registers
*/ */
PTR_L t3, TASK_THREAD_INFO(a0) .set push
LONG_L t0, TI_FLAGS(t3) .set noreorder
li t1, _TIF_USEDFPU beqz a3, 1f
and t2, t0, t1 PTR_L t3, TASK_THREAD_INFO(a0)
beqz t2, 1f .set pop
nor t1, zero, t1
and t0, t0, t1
LONG_S t0, TI_FLAGS(t3)
/* /*
* clear saved user stack CU1 bit * clear saved user stack CU1 bit
...@@ -57,14 +53,13 @@ ...@@ -57,14 +53,13 @@
1: 1:
/* check if we need to save COP2 registers */ /* check if we need to save COP2 registers */
PTR_L t2, TASK_THREAD_INFO(a0) LONG_L t0, ST_OFF(t3)
LONG_L t0, ST_OFF(t2)
bbit0 t0, 30, 1f bbit0 t0, 30, 1f
/* Disable COP2 in the stored process state */ /* Disable COP2 in the stored process state */
li t1, ST0_CU2 li t1, ST0_CU2
xor t0, t1 xor t0, t1
LONG_S t0, ST_OFF(t2) LONG_S t0, ST_OFF(t3)
/* Enable COP2 so we can save it */ /* Enable COP2 so we can save it */
mfc0 t0, CP0_STATUS mfc0 t0, CP0_STATUS
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册