diff options
Diffstat (limited to 'include/asm-i386/i387.h')
-rw-r--r-- | include/asm-i386/i387.h | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/include/asm-i386/i387.h b/include/asm-i386/i387.h index 434936c732d6..cdd1e248e3b4 100644 --- a/include/asm-i386/i387.h +++ b/include/asm-i386/i387.h | |||
@@ -74,17 +74,18 @@ static inline void __save_init_fpu( struct task_struct *tsk ) | |||
74 | task_thread_info(tsk)->status &= ~TS_USEDFPU; | 74 | task_thread_info(tsk)->status &= ~TS_USEDFPU; |
75 | } | 75 | } |
76 | 76 | ||
77 | #define __unlazy_fpu( tsk ) do { \ | 77 | #define __unlazy_fpu( tsk ) do { \ |
78 | if (task_thread_info(tsk)->status & TS_USEDFPU) \ | 78 | if (task_thread_info(tsk)->status & TS_USEDFPU) { \ |
79 | save_init_fpu( tsk ); \ | 79 | __save_init_fpu(tsk); \ |
80 | else \ | 80 | stts(); \ |
81 | tsk->fpu_counter = 0; \ | 81 | } else \ |
82 | tsk->fpu_counter = 0; \ | ||
82 | } while (0) | 83 | } while (0) |
83 | 84 | ||
84 | #define __clear_fpu( tsk ) \ | 85 | #define __clear_fpu( tsk ) \ |
85 | do { \ | 86 | do { \ |
86 | if (task_thread_info(tsk)->status & TS_USEDFPU) { \ | 87 | if (task_thread_info(tsk)->status & TS_USEDFPU) { \ |
87 | asm volatile("fnclex ; fwait"); \ | 88 | asm volatile("fnclex ; fwait"); \ |
88 | task_thread_info(tsk)->status &= ~TS_USEDFPU; \ | 89 | task_thread_info(tsk)->status &= ~TS_USEDFPU; \ |
89 | stts(); \ | 90 | stts(); \ |
90 | } \ | 91 | } \ |
@@ -113,7 +114,7 @@ static inline void save_init_fpu( struct task_struct *tsk ) | |||
113 | __clear_fpu( tsk ); \ | 114 | __clear_fpu( tsk ); \ |
114 | preempt_enable(); \ | 115 | preempt_enable(); \ |
115 | } while (0) | 116 | } while (0) |
116 | \ | 117 | |
117 | /* | 118 | /* |
118 | * FPU state interaction... | 119 | * FPU state interaction... |
119 | */ | 120 | */ |