diff --git a/package/base/linux24/99-hotfix-i386-x86_64-fpu-state.patch b/package/base/linux24/99-hotfix-i386-x86_64-fpu-state.patch new file mode 100644 index 000000000..233bc666b --- /dev/null +++ b/package/base/linux24/99-hotfix-i386-x86_64-fpu-state.patch @@ -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 + +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(); \ + } \ + diff --git a/package/base/linux26/99-hotfix-i386-x86_64-fpu-state.patch b/package/base/linux26/99-hotfix-i386-x86_64-fpu-state.patch new file mode 100644 index 000000000..42389f237 --- /dev/null +++ b/package/base/linux26/99-hotfix-i386-x86_64-fpu-state.patch @@ -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 + +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(); \ + } \ +