mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

38 lines
1.2 KiB

# 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:57:43 -07:00
+++ b/include/asm-i386/i387.h 2004-06-15 08:57:43 -07:00
@@ -34,7 +34,7 @@
#define clear_fpu( tsk ) do { \
if ( tsk->flags & PF_USEDFPU ) { \
- asm volatile("fwait"); \
+ asm volatile("fnclex ; fwait"); \
tsk->flags &= ~PF_USEDFPU; \
stts(); \
} \
diff -Naur a/include/asm-x86_64/i387.h b/include/asm-x86_64/i387.h
--- a/include/asm-x86_64/i387.h 2003-08-25 13:44:44.000000000 +0200
+++ b/include/asm-x86_64/i387.h 2004-06-13 05:27:55.000000000 +0200
@@ -34,7 +34,7 @@
#define clear_fpu( tsk ) do { \
if ( tsk->flags & PF_USEDFPU ) { \
- asm volatile("fwait"); \
+ asm volatile("fnclex ; fwait"); \
tsk->flags &= ~PF_USEDFPU; \
stts(); \
} \