OpenSDE Packages Database (without history before r20070)
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.

54 lines
1.9 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../fglrx/xf86-video-fglrx-12.2-TS_USEDFPU_fix.patch
  5. # Copyright (C) 2012 The OpenSDE Project
  6. #
  7. # More information can be found in the files COPYING and README.
  8. #
  9. # This patch file is dual-licensed. It is available under the license the
  10. # patched project is licensed under, as long as it is an OpenSource license
  11. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  12. # of the GNU General Public License as published by the Free Software
  13. # Foundation; either version 2 of the License, or (at your option) any later
  14. # version.
  15. # --- SDE-COPYRIGHT-NOTE-END ---
  16. http://phoronix.com/forums/showthread.php?68922-Patch-to-compile-fgrlx-module-on-Linux-3-3-rc4-with-x86-32-bit-arch
  17. fixed fgrlx compilation error on 32-bit x86 arch with kernel 3.3-rc4 due to commit:
  18. https://github.com/torvalds/linux/commit/f94edacf998516ac9d849f7bc6949a703977a7f3
  19. Signed-off-by: Gianluca Gennari <gennarone@gmail.com>
  20. ---
  21. firegl_public.c | 9 +++++++++
  22. 1 files changed, 9 insertions(+), 0 deletions(-)
  23. diff --git a/firegl_public.c b/firegl_public.c
  24. index 6e0aa82..5010b91 100644
  25. --- fglrx/common/lib/modules/fglrx/build_mod/firegl_public.c
  26. +++ fglrx/common/lib/modules/fglrx/build_mod/firegl_public.c
  27. @@ -5797,6 +5797,14 @@ void ATI_API_CALL KCL_fpu_begin(void)
  28. #ifdef CONFIG_X86_64
  29. kernel_fpu_begin();
  30. #else
  31. +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0)
  32. + struct task_struct *tsk = current;
  33. + preempt_disable();
  34. + if (tsk->thread.has_fpu)
  35. + __save_init_fpu(tsk);
  36. + else
  37. + clts();
  38. +#else
  39. struct thread_info *cur_task = current_thread_info();
  40. preempt_disable();
  41. if (cur_task->status & TS_USEDFPU)
  42. @@ -5804,6 +5812,7 @@ void ATI_API_CALL KCL_fpu_begin(void)
  43. else
  44. clts();
  45. #endif
  46. +#endif
  47. }
  48. /** \brief End of using FPU
  49. --
  50. 1.7.5.4