--- 15.11/common/lib/modules/fglrx/build_mod/firegl_public.c 2015-11-08 17:32:54.748514621 +0100 +++ 15.11b/common/lib/modules/fglrx/build_mod/firegl_public.c 2015-11-08 17:46:13.157284759 +0100 @@ -190,9 +190,17 @@ #include #include #include +#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0) #include "asm/i387.h" +#else +#include +#endif #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0) #include +#else +#include +#endif #endif #include "firegl_public.h" @@ -1662,6 +1670,9 @@ #if defined(__i386__) #ifndef __HAVE_ARCH_CMPXCHG +#ifndef __xg +#define __xg(x) ((volatile long *)(x)) +#endif static inline unsigned long __fgl_cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size) @@ -1698,7 +1709,11 @@ unsigned long new, int size) { #ifndef __HAVE_ARCH_CMPXCHG +#if defined(__i386__) return __fgl_cmpxchg(ptr,old,new,size); +#elif defined(__x86_64__) + return cmpxchg((unsigned long*)ptr,old,new); +#endif #else /* On kernel version 2.6.34 passing a variable or unsupported size * argument to the __cmpxchg macro causes the default-clause of a @@ -6117,8 +6132,12 @@ void ATI_API_CALL KCL_fpu_begin(void) { #ifdef CONFIG_X86_64 +#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0) kernel_fpu_begin(); #else + __kernel_fpu_begin(); +#endif +#else #ifdef TS_USEDFPU struct thread_info *cur_thread = current_thread_info(); struct task_struct *cur_task = get_current(); @@ -6154,7 +6173,11 @@ */ void ATI_API_CALL KCL_fpu_end(void) { +#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0) kernel_fpu_end(); +#else + __kernel_fpu_end(); +#endif } #endif /* __KERNEL__ */