diff options
author | Jan Kiszka <jan.kiszka@web.de> | 2007-05-02 13:27:21 -0400 |
---|---|---|
committer | Andi Kleen <andi@basil.nowhere.org> | 2007-05-02 13:27:21 -0400 |
commit | c41bf8fa5e777b6a8a19cf2484937a7167eac77f (patch) | |
tree | 982494445301d399078fe6abdedc724843561f5d /include/asm-i386 | |
parent | 02b64dab5675bc08048c7f70cbb0d8a417d20dbe (diff) |
[PATCH] i386: avoid redundant preempt_disable in __unlazy_fpu
There are two callers of __unlazy_fpu, unlazy_fpu and __switch_to, and
none of them appear to require additional preempt_disable/enable here.
Let's open-code save_init_fpu in __unlazy_fpu to save a few ops.
Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: Andi Kleen <ak@suse.de>
Diffstat (limited to 'include/asm-i386')
-rw-r--r-- | include/asm-i386/i387.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/include/asm-i386/i387.h b/include/asm-i386/i387.h index 49dc8e141310..cdd1e248e3b4 100644 --- a/include/asm-i386/i387.h +++ b/include/asm-i386/i387.h | |||
@@ -74,11 +74,12 @@ 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 ) \ |