summary refs log tree commit diff
path: root/pkgs/os-specific/linux/ati-drivers
diff options
context:
space:
mode:
authorDaniel Fox Franke <dfoxfranke@gmail.com>2015-08-03 21:42:08 -0400
committerDaniel Fox Franke <dfoxfranke@gmail.com>2015-08-03 21:42:08 -0400
commitd7443ffb892be6c61eb71a20ae19e2da23f29dc8 (patch)
treebee01a5504e13a6c65ed33c23b02e60ed50ba786 /pkgs/os-specific/linux/ati-drivers
parent17fb7ac352530c84f1d4b2d3e112c4c01d0db9f7 (diff)
downloadnixlib-d7443ffb892be6c61eb71a20ae19e2da23f29dc8.tar
nixlib-d7443ffb892be6c61eb71a20ae19e2da23f29dc8.tar.gz
nixlib-d7443ffb892be6c61eb71a20ae19e2da23f29dc8.tar.bz2
nixlib-d7443ffb892be6c61eb71a20ae19e2da23f29dc8.tar.lz
nixlib-d7443ffb892be6c61eb71a20ae19e2da23f29dc8.tar.xz
nixlib-d7443ffb892be6c61eb71a20ae19e2da23f29dc8.tar.zst
nixlib-d7443ffb892be6c61eb71a20ae19e2da23f29dc8.zip
Only use underscored versions of read_cr4 and write_cr4 in 3.18 and above.
I'm not sure precisely in what micro-version the API change was made, so
the check for 3.18.0 and above may not be quite correct. But it's at
least sufficient for every version currently included in NixOS.
Diffstat (limited to 'pkgs/os-specific/linux/ati-drivers')
-rw-r--r--pkgs/os-specific/linux/ati-drivers/kernel-api-fixes.patch27
1 files changed, 21 insertions, 6 deletions
diff --git a/pkgs/os-specific/linux/ati-drivers/kernel-api-fixes.patch b/pkgs/os-specific/linux/ati-drivers/kernel-api-fixes.patch
index de1984c4c496..f763518b249c 100644
--- a/pkgs/os-specific/linux/ati-drivers/kernel-api-fixes.patch
+++ b/pkgs/os-specific/linux/ati-drivers/kernel-api-fixes.patch
@@ -1,7 +1,22 @@
 diff -Nru 15.7/common/lib/modules/fglrx/build_mod/firegl_public.c 15.7.new/common/lib/modules/fglrx/build_mod/firegl_public.c
 --- 15.7/common/lib/modules/fglrx/build_mod/firegl_public.c	2015-07-04 10:31:23.000000000 -0400
-+++ 15.7.new/common/lib/modules/fglrx/build_mod/firegl_public.c	2015-08-03 00:30:34.927839497 -0400
-@@ -3495,10 +3495,12 @@
++++ 15.7.new/common/lib/modules/fglrx/build_mod/firegl_public.c	2015-08-03 21:21:13.893211082 -0400
+@@ -242,6 +242,14 @@
+ #endif
+ 
+ // ============================================================
++
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0)
++#define __read_cr4 read_cr4
++#define __write_cr4 write_cr4
++#endif
++
++// ============================================================
++
+ /* globals */
+ 
+ char* firegl = NULL;
+@@ -3495,10 +3503,12 @@
          KCL_PUB_InterruptHandlerWrap,
  #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)
          ((useMSI) ? (SA_INTERRUPT) : (SA_SHIRQ)),
@@ -15,7 +30,7 @@ diff -Nru 15.7/common/lib/modules/fglrx/build_mod/firegl_public.c 15.7.new/commo
  #endif
          dev_name,
          context);
-@@ -4498,8 +4500,8 @@
+@@ -4498,8 +4508,8 @@
  
      if (cpu_has_pge)
      {
@@ -26,7 +41,7 @@ diff -Nru 15.7/common/lib/modules/fglrx/build_mod/firegl_public.c 15.7.new/commo
      }
       __flush_tlb();
  
-@@ -4512,7 +4514,7 @@
+@@ -4512,7 +4522,7 @@
      write_cr0(cr0 & 0xbfffffff);
      if (cpu_has_pge)
      {
@@ -35,7 +50,7 @@ diff -Nru 15.7/common/lib/modules/fglrx/build_mod/firegl_public.c 15.7.new/commo
      }
      local_irq_restore(flags);
  
-@@ -4539,8 +4541,8 @@
+@@ -4539,8 +4549,8 @@
  
      if (cpu_has_pge)
      {
@@ -46,7 +61,7 @@ diff -Nru 15.7/common/lib/modules/fglrx/build_mod/firegl_public.c 15.7.new/commo
      }
       __flush_tlb();
    
-@@ -4552,7 +4554,7 @@
+@@ -4552,7 +4562,7 @@
      write_cr0(cr0 & 0xbfffffff);
      if (cpu_has_pge)
      {