MIPS: Loongson: Fix COP2 usage for preemptible kernel
authorHuacai Chen <chenhc@lemote.com>
Mon, 11 Aug 2014 09:10:38 +0000 (17:10 +0800)
committerRalf Baechle <ralf@linux-mips.org>
Tue, 19 Aug 2014 16:04:24 +0000 (18:04 +0200)
commitbfcdf1306361951b104c6858d07f6778b53e4368
tree9752e9f37fe001dd624b082a651e8a0bf0c2e25d
parentbbbf6d8768f5cac3523c408917083a111b1f3ffe
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 <chenhc@lemote.com>
Cc: John Crispin <john@phrozen.org>
Cc: Steven J. Hill <Steven.Hill@imgtec.com>
Cc: Aurelien Jarno <aurelien@aurel32.net>
Cc: linux-mips@linux-mips.org
Cc: Fuxin Zhang <zhangfx@lemote.com>
Cc: Zhangjin Wu <wuzhangjin@gmail.com>
Patchwork: https://patchwork.linux-mips.org/patch/7515/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/loongson/loongson-3/cop2-ex.c