summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorBalló György2017-03-31 11:19:33 +0200
committerBalló György2017-03-31 11:19:33 +0200
commit7ab077f96baef56fce801b9f4ca15fb8f060412b (patch)
treeca63c771520c799ed9e75574b7e19295cff6e4f7
parentab80cd0a4ce230122020d04ae8217383fd40eeb4 (diff)
downloadaur-7ab077f96baef56fce801b9f4ca15fb8f060412b.tar.gz
upgpkg: nvidia-96xx-dkms 96.43.23-8
Rebuild for Linux 4.10
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD5
-rw-r--r--linux-4.10.patch73
3 files changed, 80 insertions, 2 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 35fb78e51b89..3aecfbd02645 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = nvidia-96xx-dkms
pkgdesc = NVIDIA kernel module sources (DKMS), 96xx branch
pkgver = 96.43.23
- pkgrel = 7
+ pkgrel = 8
url = http://www.nvidia.com/
arch = i686
arch = x86_64
@@ -20,6 +20,7 @@ pkgbase = nvidia-96xx-dkms
source = linux-3.19.patch
source = linux-4.0.patch
source = linux-4.3.patch
+ source = linux-4.10.patch
source = dkms.conf
md5sums = 944ed806c8d0f9174d5e9e16ae065bf6
md5sums = f2e605724a13ee01bf290df3bf9a3a93
@@ -27,6 +28,7 @@ pkgbase = nvidia-96xx-dkms
md5sums = ab3e06a699bfd0a91ab77a88e112ad44
md5sums = 89072d9c1b37867f01dd7a41521c0ed1
md5sums = 20bde657bb715e16295d7e82fe799fca
+ md5sums = 8a46a9e33749ae1d4d14b1117a36d95c
md5sums = d28e74675462b215f080960c130c43fc
source_i686 = http://download.nvidia.com/XFree86/Linux-x86/96.43.23/NVIDIA-Linux-x86-96.43.23-pkg0.run
md5sums_i686 = ca0bc6ae3b37cb259f3a906b4dc4670b
diff --git a/PKGBUILD b/PKGBUILD
index 67a997af71e0..52675058111f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,7 +5,7 @@
pkgname=nvidia-96xx-dkms
pkgver=96.43.23
-pkgrel=7
+pkgrel=8
pkgdesc="NVIDIA kernel module sources (DKMS), 96xx branch"
arch=('i686' 'x86_64')
[ "$CARCH" = "i686" ] && _arch=x86
@@ -25,6 +25,7 @@ source=(173.14.36-37.patch
linux-3.19.patch
linux-4.0.patch
linux-4.3.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=('944ed806c8d0f9174d5e9e16ae065bf6'
'ab3e06a699bfd0a91ab77a88e112ad44'
'89072d9c1b37867f01dd7a41521c0ed1'
'20bde657bb715e16295d7e82fe799fca'
+ '8a46a9e33749ae1d4d14b1117a36d95c'
'd28e74675462b215f080960c130c43fc')
md5sums_i686=('ca0bc6ae3b37cb259f3a906b4dc4670b')
md5sums_x86_64=('a043fe8dd639bd00b1792eea7a195677')
@@ -48,6 +50,7 @@ prepare() {
patch -p1 --no-backup-if-mismatch -i "$srcdir/linux-3.19.patch"
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.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
+ }
+