diff options
Diffstat (limited to 'arch/mips/kernel/mips-r2-to-r6-emul.c')
-rw-r--r-- | arch/mips/kernel/mips-r2-to-r6-emul.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/arch/mips/kernel/mips-r2-to-r6-emul.c b/arch/mips/kernel/mips-r2-to-r6-emul.c index 28cb88daa3ef..6092cdf7f8d9 100644 --- a/arch/mips/kernel/mips-r2-to-r6-emul.c +++ b/arch/mips/kernel/mips-r2-to-r6-emul.c @@ -1174,13 +1174,9 @@ repeat: fpu_emul: regs->regs[31] = r31; regs->cp0_epc = epc; - if (!used_math()) { /* First time FPU user. */ - preempt_disable(); - err = init_fpu(); - preempt_enable(); - set_used_math(); - } - lose_fpu(1); /* Save FPU state for the emulator. */ + + if (!init_fp_ctx(current)) + lose_fpu(1); err = fpu_emulator_cop1Handler(regs, ¤t->thread.fpu, 0, &fault_addr); |