summaryrefslogtreecommitdiffstats
path: root/arch/mips64/kernel/traps.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips64/kernel/traps.c')
-rw-r--r--arch/mips64/kernel/traps.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/mips64/kernel/traps.c b/arch/mips64/kernel/traps.c
index 9f97fb0d8..fa58017cf 100644
--- a/arch/mips64/kernel/traps.c
+++ b/arch/mips64/kernel/traps.c
@@ -346,6 +346,7 @@ void do_cpu(struct pt_regs *regs)
goto bad_cid;
regs->cp0_status |= ST0_CU1;
+#ifndef CONFIG_SMP
if (last_task_used_math == current)
return;
@@ -357,6 +358,15 @@ void do_cpu(struct pt_regs *regs)
current->used_math = 1;
}
last_task_used_math = current;
+#else
+ if (current->used_math) {
+ lazy_fpu_switch(0, current);
+ } else {
+ init_fpu();
+ current->used_math = 1;
+ }
+ current->flags |= PF_USEDFPU;
+#endif
return;
bad_cid: