summaryrefslogtreecommitdiffstats
path: root/arch/mips/loongson64/loongson-3/cop2-ex.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/loongson64/loongson-3/cop2-ex.c')
-rw-r--r--arch/mips/loongson64/loongson-3/cop2-ex.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/arch/mips/loongson64/loongson-3/cop2-ex.c b/arch/mips/loongson64/loongson-3/cop2-ex.c
index 621d6af5f6eb..9efdfe430ff0 100644
--- a/arch/mips/loongson64/loongson-3/cop2-ex.c
+++ b/arch/mips/loongson64/loongson-3/cop2-ex.c
@@ -43,11 +43,8 @@ static int loongson_cu2_call(struct notifier_block *nfb, unsigned long action,
/* If FPU is owned, we needn't init or restore fp */
if (!fpu_owned) {
set_thread_flag(TIF_USEDFPU);
- if (!used_math()) {
- _init_fpu(current->thread.fpu.fcr31);
- set_used_math();
- } else
- _restore_fp(current);
+ init_fp_ctx(current);
+ _restore_fp(current);
}
preempt_enable();
OpenPOWER on IntegriCloud