|
|
@ -1,40 +0,0 @@ |
|
|
|
|
|
|
|
# ChangeSet |
|
|
|
|
|
|
|
# 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> |
|
|
|
|
|
|
|
diff -Nru a/include/asm-i386/i387.h b/include/asm-i386/i387.h
|
|
|
|
--- a/include/asm-i386/i387.h 2004-06-15 08:53:59 -07:00
|
|
|
|
+++ b/include/asm-i386/i387.h 2004-06-15 08:53:59 -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(); \ |
|
|
|
} \ |
|
|
|
|
|
|
|
i |
|
|
|
diff -Nru a/include/asm-x86_64/i387.h b/include/asm-x86_64/i387.h
|
|
|
|
--- a/include/asm-x86_64/i387.h 2004-06-15 08:54:33 -07:00
|
|
|
|
+++ b/include/asm-x86_64/i387.h 2004-06-15 08:54:33 -07:00
|
|
|
|
@@ -48,7 +48,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(); \ |
|
|
|
} \ |
|
|
|
|