* added linux2{4,6} patches for the recent fpu-state bug git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@3225 c5f82cb5-29bc-0310-9cd0-bff59a50e3bcrocklinux
@ -0,0 +1,38 @@ |
|||||
|
|
||||
|
# 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(); \ |
||||
|
} \ |
||||
|
|
@ -0,0 +1,40 @@ |
|||||
|
|
||||
|
# 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(); \ |
||||
|
} \ |
||||
|
|