|
@@ -378,8 +378,14 @@ static inline void __thread_fpu_begin(struct task_struct *tsk)
|
|
|
__thread_set_has_fpu(tsk);
|
|
|
}
|
|
|
|
|
|
-static inline void __drop_fpu(struct task_struct *tsk)
|
|
|
+static inline void drop_fpu(struct task_struct *tsk)
|
|
|
{
|
|
|
+ /*
|
|
|
+ * Forget coprocessor state..
|
|
|
+ */
|
|
|
+ preempt_disable();
|
|
|
+ tsk->thread.fpu_counter = 0;
|
|
|
+
|
|
|
if (__thread_has_fpu(tsk)) {
|
|
|
/* Ignore delayed exceptions from user space */
|
|
|
asm volatile("1: fwait\n"
|
|
@@ -387,16 +393,7 @@ static inline void __drop_fpu(struct task_struct *tsk)
|
|
|
_ASM_EXTABLE(1b, 2b));
|
|
|
__thread_fpu_end(tsk);
|
|
|
}
|
|
|
-}
|
|
|
|
|
|
-static inline void drop_fpu(struct task_struct *tsk)
|
|
|
-{
|
|
|
- /*
|
|
|
- * Forget coprocessor state..
|
|
|
- */
|
|
|
- preempt_disable();
|
|
|
- tsk->thread.fpu_counter = 0;
|
|
|
- __drop_fpu(tsk);
|
|
|
clear_stopped_child_used_math(tsk);
|
|
|
preempt_enable();
|
|
|
}
|