--- a/common/lib/modules/fglrx/build_mod/firegl_public.c 2015-09-13 13:55:29.000000000 -0400 +++ b/common/lib/modules/fglrx/build_mod/firegl_public.c 2015-09-13 14:56:24.000000000 -0400 @@ -192,8 +192,13 @@ #include #include #include +#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0) #include "asm/i387.h" -#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0) +#endif +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0) +#include +#define __HAVE_ARCH_CMPXCHG 1 +#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0) #include #endif @@ -3528,8 +3533,12 @@ int ATI_API_CALL KCL_InstallInterruptHan #else //when MSI enabled. keep irq disabled when calling the action handler, //exclude this IRQ from irq balancing (only on one CPU) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0) + ((useMSI) ? (IRQF_NOBALANCING) : (IRQF_SHARED)), +#else ((useMSI) ? (IRQF_DISABLED) : (IRQF_SHARED)), #endif +#endif dev_name, context); } @@ -6465,7 +6474,7 @@ void ATI_API_CALL KCL_create_uuid(void * generate_random_uuid((char *)buf); } -#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0) +#if (!defined(CONFIG_X86_64) || LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0)) && LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0) static int KCL_fpu_save_init(struct task_struct *tsk) { struct fpu *fpu = &tsk->thread.fpu;