diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-mips/fpu.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/asm-mips/fpu.h b/include/asm-mips/fpu.h index 58c561a9ec6b..efef843b93f0 100644 --- a/include/asm-mips/fpu.h +++ b/include/asm-mips/fpu.h | |||
@@ -134,9 +134,11 @@ static inline void restore_fp(struct task_struct *tsk) | |||
134 | 134 | ||
135 | static inline fpureg_t *get_fpu_regs(struct task_struct *tsk) | 135 | static inline fpureg_t *get_fpu_regs(struct task_struct *tsk) |
136 | { | 136 | { |
137 | if (cpu_has_fpu) { | 137 | if (tsk == current) { |
138 | if ((tsk == current) && __is_fpu_owner()) | 138 | preempt_disable(); |
139 | if (is_fpu_owner()) | ||
139 | _save_fp(current); | 140 | _save_fp(current); |
141 | preempt_enable(); | ||
140 | } | 142 | } |
141 | 143 | ||
142 | return tsk->thread.fpu.fpr; | 144 | return tsk->thread.fpu.fpr; |