0004-Use-fpregs_active-instead-of-has_fpu.patch 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. From 7120f00015570a2e4d9b6532731960d509c71cba Mon Sep 17 00:00:00 2001
  2. From: Alberto Milone <alberto.milone@canonical.com>
  3. Date: Thu, 17 Sep 2015 15:48:30 +0200
  4. Subject: [PATCH] Use fpregs_active instead of has_fpu
  5. This is for Linux 4.2
  6. Thanks to Tim Gardner for the patch.
  7. Signed-off-by: Romain Perier <romain.perier@free-electrons.com>
  8. ---
  9. common/lib/modules/fglrx/build_mod/firegl_public.c | 4 ++++
  10. 1 file changed, 4 insertions(+)
  11. diff --git a/common/lib/modules/fglrx/build_mod/firegl_public.c b/common/lib/modules/fglrx/build_mod/firegl_public.c
  12. index 749ea51..4c1f9a5 100755
  13. --- a/common/lib/modules/fglrx/build_mod/firegl_public.c
  14. +++ b/common/lib/modules/fglrx/build_mod/firegl_public.c
  15. @@ -6528,7 +6528,11 @@ void ATI_API_CALL KCL_fpu_begin(void)
  16. /* The thread structure is changed with the commit below for kernel 3.3:
  17. * https://github.com/torvalds/linux/commit/7e16838d94b566a17b65231073d179bc04d590c8
  18. */
  19. +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0)
  20. + if (cur_task->thread.fpu.fpregs_active)
  21. +#else
  22. if (cur_task->thread.fpu.has_fpu)
  23. +#endif
  24. #else
  25. if (cur_task->thread.has_fpu)
  26. #endif
  27. --
  28. 2.8.1