[arch-commits] Commit in nvidia-340xx/trunk (3 files)

Tobias Powalowski tpowa at archlinux.org
Mon May 22 13:09:14 UTC 2017


    Date: Monday, May 22, 2017 @ 13:09:13
  Author: tpowa
Revision: 296407

upgpkg: nvidia-340xx 340.102-7

bump to 4.11.2

Added:
  nvidia-340xx/trunk/4.11.0_kernel.patch
Modified:
  nvidia-340xx/trunk/PKGBUILD
  nvidia-340xx/trunk/nvidia-340xx.install

----------------------+
 4.11.0_kernel.patch  |  112 +++++++++++++++++++++++++++++++++++++++++++++++++
 PKGBUILD             |   14 +++---
 nvidia-340xx.install |    2 
 3 files changed, 121 insertions(+), 7 deletions(-)

Added: 4.11.0_kernel.patch
===================================================================
--- 4.11.0_kernel.patch	                        (rev 0)
+++ 4.11.0_kernel.patch	2017-05-22 13:09:13 UTC (rev 296407)
@@ -0,0 +1,112 @@
+--- a/kernel/nv-drm.c
++++ b/kernel/nv-drm.c
+@@ -22,6 +22,8 @@
+ #include <drm/drm_gem.h>
+ #endif
+ 
++#include <linux/version.h>
++
+ extern nv_linux_state_t *nv_linux_devices;
+ 
+ struct nv_gem_object {
+@@ -48,7 +50,11 @@
+     return -ENODEV;
+ }
+ 
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0)
+ static int nv_drm_unload(
++#else
++static void nv_drm_unload(
++#endif
+     struct drm_device *dev
+ )
+ {
+@@ -60,11 +66,19 @@
+         {
+             BUG_ON(nvl->drm != dev);
+             nvl->drm = NULL;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0)
+             return 0;
++#else
++            return;
++#endif
+         }
+     }
+ 
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0)
+     return -ENODEV;
++#else
++    return;
++#endif
+ }
+ 
+ static void nv_gem_free(
+
+--- a/kernel/uvm/nvidia_uvm_linux.h
++++ b/kernel/uvm/nvidia_uvm_linux.h
+@@ -124,6 +124,9 @@
+ #include <linux/delay.h>            /* mdelay, udelay                   */
+ 
+ #include <linux/sched.h>            /* suser(), capable() replacement   */
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
++#include <linux/sched/signal.h>
++#endif
+ #include <linux/moduleparam.h>      /* module_param()                   */
+ #if !defined(NV_VMWARE)
+ #include <asm/tlbflush.h>           /* flush_tlb(), flush_tlb_all()     */
+@@ -362,6 +365,7 @@
+     void address_space_init_once(struct address_space *mapping);
+ #endif
+ 
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0)
+ #if !defined(NV_FATAL_SIGNAL_PENDING_PRESENT)
+     static inline int __fatal_signal_pending(struct task_struct *p)
+     {
+@@ -372,6 +376,7 @@
+     {
+         return signal_pending(p) && __fatal_signal_pending(p);
+     }
++#endif
+ #endif
+ 
+ //
+
+--- a/kernel/uvm/nvidia_uvm_lite.c
++++ b/kernel/uvm/nvidia_uvm_lite.c
+@@ -818,7 +818,11 @@
+ }
+ 
+ #if defined(NV_VM_OPERATIONS_STRUCT_HAS_FAULT)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
++int _fault(struct vm_fault *vmf)
++#else
+ int _fault(struct vm_area_struct *vma, struct vm_fault *vmf)
++#endif
+ {
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
+     unsigned long vaddr = (unsigned long)vmf->virtual_address;
+@@ -828,7 +832,11 @@
+     struct page *page = NULL;
+     int retval;
+ 
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
++    retval = _fault_common(NULL, vaddr, &page, vmf->flags);
++#else
+     retval = _fault_common(vma, vaddr, &page, vmf->flags);
++#endif
+ 
+     vmf->page = page;
+ 
+@@ -866,7 +874,11 @@
+ // it's dealing with anonymous mapping (see handle_pte_fault).
+ //
+ #if defined(NV_VM_OPERATIONS_STRUCT_HAS_FAULT)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
++int _sigbus_fault(struct vm_fault *vmf)
++#else
+ int _sigbus_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
++#endif
+ {
+     vmf->page = NULL;
+     return VM_FAULT_SIGBUS;
+

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2017-05-22 13:02:08 UTC (rev 296406)
+++ PKGBUILD	2017-05-22 13:09:13 UTC (rev 296407)
@@ -5,19 +5,20 @@
 pkgbase=nvidia-340xx
 pkgname=(nvidia-340xx nvidia-340xx-dkms)
 pkgver=340.102
-_extramodules=extramodules-4.10-ARCH
-pkgrel=6
+_extramodules=extramodules-4.11-ARCH
+pkgrel=7
 arch=('i686' 'x86_64')
 url="http://www.nvidia.com/"
-makedepends=("nvidia-340xx-utils=${pkgver}" 'linux' 'linux-headers>=4.10' 'linux-headers<4.11')
+makedepends=("nvidia-340xx-utils=${pkgver}" 'linux' 'linux-headers>=4.11' 'linux-headers<4.12')
 conflicts=('nvidia')
 license=('custom')
 options=(!strip)
-source=('fs52243.patch' '4.10.0_kernel.patch')
+source=('fs52243.patch' '4.10.0_kernel.patch' '4.11.0_kernel.patch')
 source_i686+=("http://us.download.nvidia.com/XFree86/Linux-x86/${pkgver}/NVIDIA-Linux-x86-${pkgver}.run")
 source_x86_64+=("http://us.download.nvidia.com/XFree86/Linux-x86_64/${pkgver}/NVIDIA-Linux-x86_64-${pkgver}-no-compat32.run")
 sha512sums=('de4f697d64f8e73c4aadec1a407884a6bc459c0020d4bfd19740fe4177a60bb801fe8a74ef6f7fa2e89c6cd648ea4daf152799ae344a145c06480a6eef0c5bca'
-            '88a2b448c1e8445dc43820328e86d8f20eb7e3cb5774e704cd44191a9fa26064264510c1adc9ea938fa2c92075496f3a27bd52ae6e6f4ec5fa6d4a829dd961e8')
+            '88a2b448c1e8445dc43820328e86d8f20eb7e3cb5774e704cd44191a9fa26064264510c1adc9ea938fa2c92075496f3a27bd52ae6e6f4ec5fa6d4a829dd961e8'
+            '48eb48dfd118a5d76d0e01c3bb5aedb7e6ec153a40680c0ebd6842c74fe1dda49e1cc8dc2b2493b7355de47d3013c578a13c254c5bb3eecdbfcf8f4ebc7c7c34')
 sha512sums_i686=('bea700c925a6044fcded40324bb389c5fa1aadc40831f685a76e7b0ded11161f492960950c201467e564d157dcbe0c330d13a2014f51d0073002c5a262a6f0ca')
 sha512sums_x86_64=('2a29e6418244ea384e4237d74057bd8e56247b1c503cf623dea34a3b1065d8783879aa7e6a802dd31f0a10cf81cfcab2a1b1a8269b97996f15fa1838c0a3a44b')
 
@@ -31,6 +32,7 @@
 
     patch -Np0 < "${srcdir}"/fs52243.patch
     patch -Np1 < "${srcdir}"/4.10.0_kernel.patch
+    patch -Np1 < "${srcdir}"/4.11.0_kernel.patch
 
     cp -a kernel kernel-dkms
 }
@@ -46,7 +48,7 @@
 
 package_nvidia-340xx() {
     pkgdesc="NVIDIA drivers for linux, 340xx legacy branch"
-    depends=('linux>=4.10' 'linux<4.11' 'libgl' "nvidia-340xx-utils=${pkgver}")
+    depends=('linux>=4.11' 'linux<4.12' 'libgl' "nvidia-340xx-utils=${pkgver}")
     conflict+=('nvidia-340xx-dkms')
     install=nvidia-340xx.install
 

Modified: nvidia-340xx.install
===================================================================
--- nvidia-340xx.install	2017-05-22 13:02:08 UTC (rev 296406)
+++ nvidia-340xx.install	2017-05-22 13:09:13 UTC (rev 296407)
@@ -1,5 +1,5 @@
 post_install() {
-    EXTRAMODULES='extramodules-4.10-ARCH'
+    EXTRAMODULES='extramodules-4.11-ARCH'
     depmod $(cat /usr/lib/modules/$EXTRAMODULES/version)
     echo 'In order to use nvidia module, reboot the system.'
 }



More information about the arch-commits mailing list