Fix x86 "clear_cpu()" macro.
[Posted June 15, 2004 by corbet]
| From: |
| Linux Kernel Mailing List <linux-kernel-AT-vger.kernel.org> |
| To: |
| bk-commits-head-AT-vger.kernel.org |
| Subject: |
| Fix x86 "clear_cpu()" macro. |
| Date: |
| Sun, 13 Jun 2004 02:12:31 +0000 |
ChangeSet 1.1755, 2004/06/12 19:12:31-07:00, torvalds@evo.osdl.org
Fix x86 "clear_cpu()" macro.
We need to clear all exceptions before synchronizing
with the FPU, since we aren't ready to handle a FP
exception here and we're getting rid of all FP state.
Special thanks to Alexander Nyberg for reports and
testing. Alternate patches by Sergey Vlasov and Andi
Kleen, who both worked on this.
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
i387.h | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
diff -Nru a/include/asm-i386/i387.h b/include/asm-i386/i387.h
--- a/include/asm-i386/i387.h 2004-06-12 20:07:22 -07:00
+++ b/include/asm-i386/i387.h 2004-06-12 20:07:22 -07:00
@@ -51,7 +51,7 @@
#define __clear_fpu( tsk ) \
do { \
if ((tsk)->thread_info->status & TS_USEDFPU) { \
- asm volatile("fwait"); \
+ asm volatile("fnclex ; fwait"); \
(tsk)->thread_info->status &= ~TS_USEDFPU; \
stts(); \
} \
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html