diff options
author | graysky | 2017-10-02 19:34:08 -0400 |
---|---|---|
committer | graysky | 2017-10-02 19:34:08 -0400 |
commit | 8f61383e23ac5000b74658574a50ff5df01da14f (patch) | |
tree | dfe9337ad1b5dc1a783724242c217d879fd5f3a9 | |
parent | 166a7352ab0c37f43557f033347ae80812454b55 (diff) | |
download | aur-8f61383e23ac5000b74658574a50ff5df01da14f.tar.gz |
Update to 340.104-1
-rw-r--r-- | .SRCINFO | 26 | ||||
-rw-r--r-- | 4.10.0_kernel.patch | 131 | ||||
-rw-r--r-- | 4.11.0_kernel.patch | 112 | ||||
-rw-r--r-- | 4.12.0_kernel.patch | 98 | ||||
-rw-r--r-- | PKGBUILD | 22 | ||||
-rw-r--r-- | fs52243.patch | 14 | ||||
-rw-r--r-- | kernel-4.11.patch | 38 |
7 files changed, 55 insertions, 386 deletions
@@ -1,9 +1,9 @@ # Generated by mksrcinfo v8 -# Wed Sep 20 22:00:52 UTC 2017 +# Mon Oct 2 23:34:08 UTC 2017 pkgbase = nvidia-340xx-ck pkgdesc = NVIDIA drivers for linux-ck, 340xx legacy branch. - pkgver = 340.102 - pkgrel = 18 + pkgver = 340.104 + pkgrel = 1 url = http://www.nvidia.com/ install = readme.install arch = i686 @@ -15,22 +15,16 @@ pkgbase = nvidia-340xx-ck depends = linux-ck>=4.12 depends = linux-ck<4.13 depends = libgl - depends = nvidia-340xx-utils=340.102 + depends = nvidia-340xx-utils=340.104 conflicts = nvidia-ck conflicts = nvidia-304xx-ck options = !strip - source = fs52243.patch - source = 4.10.0_kernel.patch - source = 4.11.0_kernel.patch - source = 4.12.0_kernel.patch - sha256sums = d1741377218e512063434c52a62a4fe3cfb23ab0a0ebc9fc817567692541e73e - sha256sums = b47c308d486dd777617d4195fa928091b677e4fca421b487328fab9932bc6222 - sha256sums = 72641410ba81af1dfbc8397434dc68a43a9f6ce9ac1b9dfe2beeacb6cbdc98bb - sha256sums = 210b7dc26b4f86933d96ab4da6e73d055dfcaa9e1f80eba8f3feb8f6d5ec7750 - source_i686 = http://us.download.nvidia.com/XFree86/Linux-x86/340.102/NVIDIA-Linux-x86-340.102.run - sha256sums_i686 = 61b13d5dae0f6f5d788a4d8c4c98e8d971d19cb90b606058060d007946248828 - source_x86_64 = http://us.download.nvidia.com/XFree86/Linux-x86_64/340.102/NVIDIA-Linux-x86_64-340.102-no-compat32.run - sha256sums_x86_64 = 6a36bd9a0033769ecd11ce2aa60aeb41b50b20616c43fd19c55e027c451f585e + source = kernel-4.11.patch + sha256sums = 5ba7e6d5e502882c3534d1d8578f7fd29fdf3d2aeb49206efa7b3514a7e3e821 + source_i686 = http://us.download.nvidia.com/XFree86/Linux-x86/340.104/NVIDIA-Linux-x86-340.104.run + sha256sums_i686 = e39015f8e2c6c87037be340fd1899f703ac15356c5694ad8187cd67e71491cd1 + source_x86_64 = http://us.download.nvidia.com/XFree86/Linux-x86_64/340.104/NVIDIA-Linux-x86_64-340.104-no-compat32.run + sha256sums_x86_64 = ed112523ae424aea46904d2dcfc769b0263cf552f5bfec0e30601f6f0f95eada pkgname = nvidia-340xx-ck diff --git a/4.10.0_kernel.patch b/4.10.0_kernel.patch deleted file mode 100644 index f4297b149e96..000000000000 --- a/4.10.0_kernel.patch +++ /dev/null @@ -1,131 +0,0 @@ -From 983a2ca221a371e08bb5ad11758a729cfa5aa88c Mon Sep 17 00:00:00 2001 -From: Alberto Milone <alberto.milone@canonical.com> -Date: Wed, 15 Feb 2017 17:05:55 +0100 -Subject: [PATCH 1/1] Add support for Linux 4.10 - ---- - nv-linux.h | 7 +++++++ - nv-pat.c | 40 ++++++++++++++++++++++++++++++++++++++++ - uvm/nvidia_uvm_lite.c | 4 ++++ - 3 files changed, 51 insertions(+) - -diff --git a/kernel/nv-linux.h b/kernel/nv-linux.h -index e7068e3..2d62492 100644 ---- a/kernel/nv-linux.h -+++ b/kernel/nv-linux.h -@@ -2082,6 +2082,8 @@ static inline NvU64 nv_node_end_pfn(int nid) - * 2016 Dec 14:5b56d49fc31dbb0487e14ead790fc81ca9fb2c99 - */ - -+#include <linux/version.h> -+ - #if defined(NV_GET_USER_PAGES_REMOTE_PRESENT) - #if defined(NV_GET_USER_PAGES_HAS_WRITE_AND_FORCE_ARGS) - #define NV_GET_USER_PAGES get_user_pages -@@ -2129,8 +2131,13 @@ static inline NvU64 nv_node_end_pfn(int nid) - - #else - -+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0) - return get_user_pages_remote(tsk, mm, start, nr_pages, flags, - pages, vmas); -+#else -+ return get_user_pages_remote(tsk, mm, start, nr_pages, flags, -+ pages, vmas, NULL); -+#endif - - #endif - -diff --git a/kernel/nv-pat.c b/kernel/nv-pat.c -index a725533..cec6f3f 100644 ---- a/kernel/nv-pat.c -+++ b/kernel/nv-pat.c -@@ -203,6 +203,7 @@ void nv_disable_pat_support(void) - } - - #if defined(NV_ENABLE_PAT_SUPPORT) && defined(NV_ENABLE_HOTPLUG_CPU) -+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0) - static int - nvidia_cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu) - { -@@ -234,6 +235,34 @@ static struct notifier_block nv_hotcpu_nfb = { - .notifier_call = nvidia_cpu_callback, - .priority = 0 - }; -+#else -+static int nvidia_cpu_online(unsigned int hcpu) -+{ -+ unsigned int cpu = get_cpu(); -+ if (cpu == hcpu) -+ nv_setup_pat_entries(NULL); -+ else -+ NV_SMP_CALL_FUNCTION(nv_setup_pat_entries, (void *)(long int)hcpu, 1); -+ -+ put_cpu(); -+ -+ return 0; -+} -+ -+static int nvidia_cpu_down_prep(unsigned int hcpu) -+{ -+ unsigned int cpu = get_cpu(); -+ if (cpu == hcpu) -+ nv_restore_pat_entries(NULL); -+ else -+ NV_SMP_CALL_FUNCTION(nv_restore_pat_entries, (void *)(long int)hcpu, 1); -+ -+ put_cpu(); -+ -+ return 0; -+} -+#endif -+ - #endif - - int nv_init_pat_support(nv_stack_t *sp) -@@ -255,7 +284,14 @@ int nv_init_pat_support(nv_stack_t *sp) - #if defined(NV_ENABLE_PAT_SUPPORT) && defined(NV_ENABLE_HOTPLUG_CPU) - if (nv_pat_mode == NV_PAT_MODE_BUILTIN) - { -+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0) - if (register_hotcpu_notifier(&nv_hotcpu_nfb) != 0) -+#else -+ if (cpuhp_setup_state(CPUHP_AP_ONLINE_DYN, -+ "gpu/nvidia:online", -+ nvidia_cpu_online, -+ nvidia_cpu_down_prep) != 0) -+#endif - { - nv_disable_pat_support(); - nv_printf(NV_DBG_ERRORS, -@@ -280,7 +316,11 @@ void nv_teardown_pat_support(void) - { - nv_disable_pat_support(); - #if defined(NV_ENABLE_PAT_SUPPORT) && defined(NV_ENABLE_HOTPLUG_CPU) -+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0) - unregister_hotcpu_notifier(&nv_hotcpu_nfb); -+#else -+ cpuhp_remove_state_nocalls(CPUHP_AP_ONLINE_DYN); -+#endif - #endif - } - } -diff --git a/kernel/uvm/nvidia_uvm_lite.c b/kernel/uvm/nvidia_uvm_lite.c -index 9627f60..2158b45 100644 ---- a/kernel/uvm/nvidia_uvm_lite.c -+++ b/kernel/uvm/nvidia_uvm_lite.c -@@ -820,7 +820,11 @@ done: - #if defined(NV_VM_OPERATIONS_STRUCT_HAS_FAULT) - int _fault(struct vm_area_struct *vma, struct vm_fault *vmf) - { -+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0) - unsigned long vaddr = (unsigned long)vmf->virtual_address; -+#else -+ unsigned long vaddr = (unsigned long)vmf->address; -+#endif - struct page *page = NULL; - int retval; - --- -2.7.4 - diff --git a/4.11.0_kernel.patch b/4.11.0_kernel.patch deleted file mode 100644 index 5ee3e4f04b59..000000000000 --- a/4.11.0_kernel.patch +++ /dev/null @@ -1,112 +0,0 @@ ---- 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; - diff --git a/4.12.0_kernel.patch b/4.12.0_kernel.patch deleted file mode 100644 index 095a1fc2a8ba..000000000000 --- a/4.12.0_kernel.patch +++ /dev/null @@ -1,98 +0,0 @@ -diff -Naur NVIDIA-Linux-x86_64-340.102-old/kernel/conftest.sh NVIDIA-Linux-x86_64-340.102-new/kernel/conftest.sh ---- NVIDIA-Linux-x86_64-340.102-old/kernel/conftest.sh 2017-01-16 21:15:32.000000000 +0100 -+++ NVIDIA-Linux-x86_64-340.102-new/kernel/conftest.sh 2017-07-05 20:58:45.283333334 +0200 -@@ -362,7 +362,11 @@ - # Determine if the set_memory_uc() function is present. - # - CODE=" -- #include <asm/cacheflush.h> -+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0) -+ #include <asm/set_memory.h> -+ #else -+ #include <asm/cacheflush.h> -+ #endif - void conftest_set_memory_uc(void) { - set_memory_uc(); - }" -@@ -375,7 +379,11 @@ - # Determine if the set_memory_array_uc() function is present. - # - CODE=" -- #include <asm/cacheflush.h> -+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0) -+ #include <asm/set_memory.h> -+ #else -+ #include <asm/cacheflush.h> -+ #endif - void conftest_set_memory_array_uc(void) { - set_memory_array_uc(); - }" -@@ -388,7 +396,11 @@ - # Determine if the set_pages_uc() function is present. - # - CODE=" -- #include <asm/cacheflush.h> -+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0) -+ #include <asm/set_memory.h> -+ #else -+ #include <asm/cacheflush.h> -+ #endif - void conftest_set_pages_uc(void) { - set_pages_uc(); - }" -diff -Naur NVIDIA-Linux-x86_64-340.102-old/kernel/nv-vm.c NVIDIA-Linux-x86_64-340.102-new/kernel/nv-vm.c ---- NVIDIA-Linux-x86_64-340.102-old/kernel/nv-vm.c 2017-01-16 21:15:32.000000000 +0100 -+++ NVIDIA-Linux-x86_64-340.102-new/kernel/nv-vm.c 2017-07-05 20:58:45.286666667 +0200 -@@ -13,6 +13,10 @@ - #include "nv.h" - #include "nv-linux.h" - -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0) -+ #include <asm/set_memory.h> -+#endif -+ - static inline void nv_set_contig_memory_uc(nv_pte_t *page_ptr, NvU32 num_pages) - { - if (nv_update_memory_types) -diff -Naur NVIDIA-Linux-x86_64-340.102-old/kernel/uvm/conftest.sh NVIDIA-Linux-x86_64-340.102-new/kernel/uvm/conftest.sh ---- NVIDIA-Linux-x86_64-340.102-old/kernel/uvm/conftest.sh 2017-01-16 21:15:33.000000000 +0100 -+++ NVIDIA-Linux-x86_64-340.102-new/kernel/uvm/conftest.sh 2017-07-05 20:58:45.286666667 +0200 -@@ -362,7 +362,11 @@ - # Determine if the set_memory_uc() function is present. - # - CODE=" -- #include <asm/cacheflush.h> -+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0) -+ #include <asm/set_memory.h> -+ #else -+ #include <asm/cacheflush.h> -+ #endif - void conftest_set_memory_uc(void) { - set_memory_uc(); - }" -@@ -375,7 +379,11 @@ - # Determine if the set_memory_array_uc() function is present. - # - CODE=" -- #include <asm/cacheflush.h> -+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0) -+ #include <asm/set_memory.h> -+ #else -+ #include <asm/cacheflush.h> -+ #endif - void conftest_set_memory_array_uc(void) { - set_memory_array_uc(); - }" -@@ -388,7 +396,11 @@ - # Determine if the set_pages_uc() function is present. - # - CODE=" -- #include <asm/cacheflush.h> -+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0) -+ #include <asm/set_memory.h> -+ #else -+ #include <asm/cacheflush.h> -+ #endif - void conftest_set_pages_uc(void) { - set_pages_uc(); - }" @@ -2,9 +2,9 @@ # Contributor: Thomas Baechler <thomas@archlinux.org> pkgname=nvidia-340xx-ck -pkgver=340.102 +pkgver=340.104 _extramodules=extramodules-4.12-ck -pkgrel=18 +pkgrel=1 pkgdesc="NVIDIA drivers for linux-ck, 340xx legacy branch." arch=('i686' 'x86_64') url="http://www.nvidia.com/" @@ -16,15 +16,12 @@ conflicts=('nvidia-ck' 'nvidia-304xx-ck') license=('custom') install=readme.install options=(!strip) -source=('fs52243.patch' '4.10.0_kernel.patch' '4.11.0_kernel.patch' '4.12.0_kernel.patch') +source=('kernel-4.11.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") -sha256sums=('d1741377218e512063434c52a62a4fe3cfb23ab0a0ebc9fc817567692541e73e' - 'b47c308d486dd777617d4195fa928091b677e4fca421b487328fab9932bc6222' - '72641410ba81af1dfbc8397434dc68a43a9f6ce9ac1b9dfe2beeacb6cbdc98bb' - '210b7dc26b4f86933d96ab4da6e73d055dfcaa9e1f80eba8f3feb8f6d5ec7750') -sha256sums_i686=('61b13d5dae0f6f5d788a4d8c4c98e8d971d19cb90b606058060d007946248828') -sha256sums_x86_64=('6a36bd9a0033769ecd11ce2aa60aeb41b50b20616c43fd19c55e027c451f585e') +sha256sums=('5ba7e6d5e502882c3534d1d8578f7fd29fdf3d2aeb49206efa7b3514a7e3e821') +sha256sums_i686=('e39015f8e2c6c87037be340fd1899f703ac15356c5694ad8187cd67e71491cd1') +sha256sums_x86_64=('ed112523ae424aea46904d2dcfc769b0263cf552f5bfec0e30601f6f0f95eada') [[ "$CARCH" = "i686" ]] && _pkg="NVIDIA-Linux-x86-${pkgver}" [[ "$CARCH" = "x86_64" ]] && _pkg="NVIDIA-Linux-x86_64-${pkgver}-no-compat32" @@ -33,12 +30,7 @@ prepare() { cd "${_pkg}" # patches here - patch -Np0 < "${srcdir}"/fs52243.patch - patch -Np1 < "${srcdir}"/4.10.0_kernel.patch - patch -Np1 < "${srcdir}"/4.11.0_kernel.patch - patch -Np1 < "${srcdir}"/4.12.0_kernel.patch - - cp -a kernel kernel-dkms + patch -Np0 < "${srcdir}/kernel-4.11.patch" } build() { diff --git a/fs52243.patch b/fs52243.patch deleted file mode 100644 index b6dc35a2e7ff..000000000000 --- a/fs52243.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- kernel/nv-drm.c 2016-12-15 12:41:26.000000000 +0100 -+++ kernel/nv-drm.c 2016-12-15 12:58:48.000000000 +0100 -@@ -115,7 +115,11 @@ - }; - - static struct drm_driver nv_drm_driver = { -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0) -+ .driver_features = DRIVER_GEM | DRIVER_PRIME | DRIVER_LEGACY, -+#else - .driver_features = DRIVER_GEM | DRIVER_PRIME, -+#endif - .load = nv_drm_load, - .unload = nv_drm_unload, - .fops = &nv_drm_fops, diff --git a/kernel-4.11.patch b/kernel-4.11.patch new file mode 100644 index 000000000000..b2b3a7a9d958 --- /dev/null +++ b/kernel-4.11.patch @@ -0,0 +1,38 @@ +--- kernel/uvm/nvidia_uvm_lite.c 2017-09-27 13:50:46.334075042 +0200 ++++ kernel/uvm/nvidia_uvm_lite.c 2017-09-27 13:56:06.358041280 +0200 +@@ -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_area_struct *vma, struct vm_fault *vmf) ++#else ++int _fault(struct vm_fault *vmf) ++#endif + { + #if defined(NV_VM_FAULT_HAS_ADDRESS) + unsigned long vaddr = vmf->address; +@@ -828,7 +832,11 @@ + struct page *page = NULL; + int retval; + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0) + retval = _fault_common(vma, vaddr, &page, vmf->flags); ++#else ++ retval = _fault_common(NULL, 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_area_struct *vma, struct vm_fault *vmf) ++#else ++int _sigbus_fault(struct vm_fault *vmf) ++#endif + { + vmf->page = NULL; + return VM_FAULT_SIGBUS; |