summaryrefslogtreecommitdiff
path: root/x11-drivers/ati-drivers/files
diff options
context:
space:
mode:
authorBlackNoxis <steven.darklight@gmail.com>2015-04-30 22:57:21 +0300
committerBlackNoxis <steven.darklight@gmail.com>2015-04-30 22:57:21 +0300
commit4130c9a970b65c23cf44abd02eef870c9f2f18c8 (patch)
tree6222b6520a81170fa16ce1be5d71b64967c42e78 /x11-drivers/ati-drivers/files
parent9434e781b51743e0449142832c8e6a8054ed9008 (diff)
[x11-drivers/ati-drivers] thanks mudler for the >=4.0 kernel patch
Diffstat (limited to 'x11-drivers/ati-drivers/files')
-rw-r--r--x11-drivers/ati-drivers/files/ati-drivers-linux-4.0.patch72
1 files changed, 72 insertions, 0 deletions
diff --git a/x11-drivers/ati-drivers/files/ati-drivers-linux-4.0.patch b/x11-drivers/ati-drivers/files/ati-drivers-linux-4.0.patch
new file mode 100644
index 00000000..9b321955
--- /dev/null
+++ b/x11-drivers/ati-drivers/files/ati-drivers-linux-4.0.patch
@@ -0,0 +1,72 @@
+diff --git a/common/lib/modules/fglrx/build_mod/firegl_public.c b/common/lib/modules/fglrx/build_mod/firegl_public.c
+index 0f7399d..eb23e06 100644
+--- a/common/lib/modules/fglrx/build_mod/firegl_public.c
++++ b/common/lib/modules/fglrx/build_mod/firegl_public.c
+@@ -4240,8 +4240,13 @@ static void kcl_mem_pat_setup (void *info)
+
+ if (cpu_has_pge)
+ {
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3,20,0)
+ cr4 = read_cr4();
+ write_cr4(cr4 & ~X86_CR4_PGE);
++#else
++ cr4 = __read_cr4();
++ __write_cr4(cr4 & ~X86_CR4_PGE);
++#endif
+ }
+ __flush_tlb();
+
+@@ -4254,7 +4259,11 @@ static void kcl_mem_pat_setup (void *info)
+ write_cr0(cr0 & 0xbfffffff);
+ if (cpu_has_pge)
+ {
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3,20,0)
+ write_cr4(cr4);
++#else
++ __write_cr4(cr4);
++#endif
+ }
+ local_irq_restore(flags);
+
+@@ -4281,8 +4290,13 @@ static void kcl_mem_pat_restore (void *info)
+
+ if (cpu_has_pge)
+ {
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3,20,0)
+ cr4 = read_cr4();
+ write_cr4(cr4 & ~X86_CR4_PGE);
++#else
++ cr4 = __read_cr4();
++ __write_cr4(cr4 & ~X86_CR4_PGE);
++#endif
+ }
+ __flush_tlb();
+
+@@ -4294,7 +4308,11 @@ static void kcl_mem_pat_restore (void *info)
+ write_cr0(cr0 & 0xbfffffff);
+ if (cpu_has_pge)
+ {
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3,20,0)
+ write_cr4(cr4);
++#else
++ __write_cr4(cr4);
++#endif
+ }
+ local_irq_restore(flags);
+
+diff --git a/common/lib/modules/fglrx/build_mod/kcl_str.c b/common/lib/modules/fglrx/build_mod/kcl_str.c
+index 2d89eb0..6df117c 100644
+--- a/common/lib/modules/fglrx/build_mod/kcl_str.c
++++ b/common/lib/modules/fglrx/build_mod/kcl_str.c
+@@ -169,7 +169,11 @@ int ATI_API_CALL KCL_STR_Strnicmp(const char* s1,
+ const char* s2,
+ KCL_TYPE_SizeSigned count)
+ {
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3,20,0)
+ return strnicmp(s1, s2, count);
++#else
++ return strncasecmp(s1, s2, count);
++#endif
+ }
+
+ /** \brief Locate character in string