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

  1. # ChangeSet
  2. # We need to clear all exceptions before synchronizing
  3. # with the FPU, since we aren't ready to handle a FP
  4. # exception here and we're getting rid of all FP state.
  5. # Special thanks to Alexander Nyberg for reports and
  6. # testing. Alternate patches by Sergey Vlasov and Andi
  7. # Kleen, who both worked on this.
  8. # Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  9. diff -Nru a/include/asm-i386/i387.h b/include/asm-i386/i387.h
  10. --- a/include/asm-i386/i387.h 2004-06-15 08:57:43 -07:00
  11. +++ b/include/asm-i386/i387.h 2004-06-15 08:57:43 -07:00
  12. @@ -34,7 +34,7 @@
  13. #define clear_fpu( tsk ) do { \
  14. if ( tsk->flags & PF_USEDFPU ) { \
  15. - asm volatile("fwait"); \
  16. + asm volatile("fnclex ; fwait"); \
  17. tsk->flags &= ~PF_USEDFPU; \
  18. stts(); \
  19. } \
  20. diff -Naur a/include/asm-x86_64/i387.h b/include/asm-x86_64/i387.h
  21. --- a/include/asm-x86_64/i387.h 2003-08-25 13:44:44.000000000 +0200
  22. +++ b/include/asm-x86_64/i387.h 2004-06-13 05:27:55.000000000 +0200
  23. @@ -34,7 +34,7 @@
  24. #define clear_fpu( tsk ) do { \
  25. if ( tsk->flags & PF_USEDFPU ) { \
  26. - asm volatile("fwait"); \
  27. + asm volatile("fnclex ; fwait"); \
  28. tsk->flags &= ~PF_USEDFPU; \
  29. stts(); \
  30. } \