diff options
author | Balló György | 2017-03-31 11:48:07 +0200 |
---|---|---|
committer | Balló György | 2017-03-31 11:48:07 +0200 |
commit | 2329a4330cbb77bc2c018af7dcc48f4a81fba5c7 (patch) | |
tree | d613b9f007e4c64e547a2bbf654b22ac4029d9bf | |
parent | ed0ef8c6cc2be6f72e27271c22e8b6f6ffaf3ce6 (diff) | |
download | aur-2329a4330cbb77bc2c018af7dcc48f4a81fba5c7.tar.gz |
upgpkg: nvidia-173xx-dkms 173.14.39-10
Rebuild for Linux 4.10
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | PKGBUILD | 5 | ||||
-rw-r--r-- | linux-4.10.patch | 73 |
3 files changed, 80 insertions, 2 deletions
@@ -1,7 +1,7 @@ pkgbase = nvidia-173xx-dkms pkgdesc = NVIDIA kernel module sources (DKMS), 173xx branch pkgver = 173.14.39 - pkgrel = 9 + pkgrel = 10 url = http://www.nvidia.com/ arch = i686 arch = x86_64 @@ -20,6 +20,7 @@ pkgbase = nvidia-173xx-dkms source = linux-4.0.patch source = linux-4.3.patch source = linux-4.6.patch + source = linux-4.10.patch source = dkms.conf md5sums = 6dfb34d8fdf35c1637932f95d2216c46 md5sums = a2042d1f47d3f7c8b380237bd0b35863 @@ -27,6 +28,7 @@ pkgbase = nvidia-173xx-dkms md5sums = c84147f5645290b6d840e987e5413536 md5sums = 20bde657bb715e16295d7e82fe799fca md5sums = a5b751e62ee8caba525c059035568422 + md5sums = 8a46a9e33749ae1d4d14b1117a36d95c md5sums = d784fa643442852babc56f60705387a4 source_i686 = http://download.nvidia.com/XFree86/Linux-x86/173.14.39/NVIDIA-Linux-x86-173.14.39-pkg0.run md5sums_i686 = 5b423543428554ef33a200fbbe3cb9fc @@ -5,7 +5,7 @@ pkgname=nvidia-173xx-dkms pkgver=173.14.39 -pkgrel=9 +pkgrel=10 pkgdesc="NVIDIA kernel module sources (DKMS), 173xx branch" arch=('i686' 'x86_64') [ "$CARCH" = "i686" ] && _arch=x86 @@ -25,6 +25,7 @@ source=(linux-3.14.patch linux-4.0.patch linux-4.3.patch linux-4.6.patch + linux-4.10.patch dkms.conf) source_i686=("http://download.nvidia.com/XFree86/Linux-x86/$pkgver/NVIDIA-Linux-x86-$pkgver-pkg0.run") source_x86_64=("http://download.nvidia.com/XFree86/Linux-x86_64/$pkgver/NVIDIA-Linux-x86_64-$pkgver-pkg0.run") @@ -34,6 +35,7 @@ md5sums=('6dfb34d8fdf35c1637932f95d2216c46' 'c84147f5645290b6d840e987e5413536' '20bde657bb715e16295d7e82fe799fca' 'a5b751e62ee8caba525c059035568422' + '8a46a9e33749ae1d4d14b1117a36d95c' 'd784fa643442852babc56f60705387a4') md5sums_i686=('5b423543428554ef33a200fbbe3cb9fc') md5sums_x86_64=('0799f194869e40141c7bac8a71762db6') @@ -48,6 +50,7 @@ prepare() { patch -p1 --no-backup-if-mismatch -i "$srcdir/linux-4.0.patch" patch -p1 --no-backup-if-mismatch -i "$srcdir/linux-4.3.patch" patch -p1 --no-backup-if-mismatch -i "$srcdir/linux-4.6.patch" + patch -p1 --no-backup-if-mismatch -i "$srcdir/linux-4.10.patch" } package() { diff --git a/linux-4.10.patch b/linux-4.10.patch new file mode 100644 index 000000000000..f22663d763ae --- /dev/null +++ b/linux-4.10.patch @@ -0,0 +1,73 @@ +diff -Naur nv.orig/nv.c nv/nv.c +--- nv.orig/nv.c 2017-03-31 10:49:58.133349000 +0200 ++++ nv/nv.c 2017-03-31 10:54:51.852724105 +0200 +@@ -1150,6 +1150,7 @@ + } + + #if defined(NV_ENABLE_PAT_SUPPORT) && defined(CONFIG_HOTPLUG_CPU) ++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0) + static int + nv_kern_cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu) + { +@@ -1181,6 +1182,34 @@ + .notifier_call = nv_kern_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 + + +@@ -1418,7 +1447,14 @@ + #if defined(NV_ENABLE_PAT_SUPPORT) && defined(CONFIG_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(); + rc = -EIO; +@@ -1565,7 +1601,11 @@ + { + __nv_disable_pat_support(); + #if defined(NV_ENABLE_PAT_SUPPORT) && defined(CONFIG_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 + } + |