MIPS: Loongson: Fix COP2 usage for preemptible kernel
authorHuacai Chen <[email protected]>
Mon, 11 Aug 2014 09:10:38 +0000 (17:10 +0800)
committerRalf Baechle <[email protected]>
Tue, 26 Aug 2014 00:18:55 +0000 (02:18 +0200)
commit7ff1740fa48c277628181a047177e0a53f09f682
tree9d4681122f3c1546b3beb3ff08e8148cadfb272e
parent4a2083f004210b526137e05677623344ad154556
MIPS: Loongson: Fix COP2 usage for preemptible kernel

In preemptible kernel, only TIF_USEDFPU flag is reliable to distinguish
whether _init_fpu()/_restore_fp() is needed. Because the value of the
CP0_Status.CU1 isn't changed during preemption.

V2: Fix coding style.

Signed-off-by: Huacai Chen <[email protected]>
Cc: John Crispin <[email protected]>
Cc: Steven J. Hill <[email protected]>
Cc: Aurelien Jarno <[email protected]>
Cc: [email protected]
Cc: Fuxin Zhang <[email protected]>
Cc: Zhangjin Wu <[email protected]>
Patchwork: https://patchwork.linux-mips.org/patch/7515/
Signed-off-by: Ralf Baechle <[email protected]>
arch/mips/loongson/loongson-3/cop2-ex.c