4.4-manjaro-xstate.patch 901 B

1234567891011121314151617181920212223
  1. --- 15.12/common/lib/modules/fglrx/build_mod/firegl_public.c 2015-12-18 19:47:41.000000000 +0100
  2. +++ b/firegl_public.c 2015-12-19 20:48:13.223261632 +0100
  3. @@ -6450,12 +6450,15 @@
  4. struct fpu *fpu = &tsk->thread.fpu;
  5. if(static_cpu_has(X86_FEATURE_XSAVE)) {
  6. -#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0)
  7. - fpu_xsave(fpu);
  8. - if (!(fpu->state->xsave.xsave_hdr.xstate_bv & XSTATE_FP))
  9. -#else
  10. +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,0)
  11. + copy_xregs_to_kernel(&fpu->state.xsave);
  12. + if (!(fpu->state.xsave.header.xfeatures & XFEATURE_MASK_FP))
  13. +#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0)
  14. copy_xregs_to_kernel(&fpu->state.xsave);
  15. if (!(fpu->state.xsave.header.xfeatures & XSTATE_FP))
  16. +#else
  17. + fpu_xsave(fpu);
  18. + if (!(fpu->state->xsave.xsave_hdr.xstate_bv & XSTATE_FP))
  19. #endif
  20. return 1;
  21. } else if (static_cpu_has(X86_FEATURE_FXSR)) {