x86: sanitize pathes arch/x86/kernel/cpu/Makefile
[deliverable/linux.git] / include / asm-i386 / i387.h
index bc1d6edae1edfe73b9d77c318fea69b9d0951328..cdd1e248e3b409529747c7bcd0b68ea032497e5e 100644 (file)
@@ -74,15 +74,18 @@ static inline void __save_init_fpu( struct task_struct *tsk )
        task_thread_info(tsk)->status &= ~TS_USEDFPU;
 }
 
-#define __unlazy_fpu( tsk ) do { \
-       if (task_thread_info(tsk)->status & TS_USEDFPU) \
-               save_init_fpu( tsk ); \
+#define __unlazy_fpu( tsk ) do {                               \
+       if (task_thread_info(tsk)->status & TS_USEDFPU) {       \
+               __save_init_fpu(tsk);                           \
+               stts();                                         \
+       } else                                                  \
+               tsk->fpu_counter = 0;                           \
 } while (0)
 
 #define __clear_fpu( tsk )                                     \
 do {                                                           \
-       if (task_thread_info(tsk)->status & TS_USEDFPU) {               \
-               asm volatile("fnclex ; fwait");                         \
+       if (task_thread_info(tsk)->status & TS_USEDFPU) {       \
+               asm volatile("fnclex ; fwait");                 \
                task_thread_info(tsk)->status &= ~TS_USEDFPU;   \
                stts();                                         \
        }                                                       \
@@ -111,13 +114,14 @@ static inline void save_init_fpu( struct task_struct *tsk )
        __clear_fpu( tsk );     \
        preempt_enable();       \
 } while (0)
-                                       \
+
 /*
  * FPU state interaction...
  */
 extern unsigned short get_fpu_cwd( struct task_struct *tsk );
 extern unsigned short get_fpu_swd( struct task_struct *tsk );
 extern unsigned short get_fpu_mxcsr( struct task_struct *tsk );
+extern asmlinkage void math_state_restore(void);
 
 /*
  * Signal frame handlers...
This page took 0.027064 seconds and 5 git commands to generate.