summaryrefslogtreecommitdiff
blob: d059f1465051acb114c80ece3511b5ae23d054c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
--- 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 <linux/string.h>
 #include <linux/gfp.h>
 #include <linux/swap.h>
+#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 <asm/fpu/internal.h>
+#define __HAVE_ARCH_CMPXCHG 1
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)
 #include <asm/fpu-internal.h>
 #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;