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

2017-11-18 Thread Jan Steffens
Date: Sunday, November 19, 2017 @ 00:02:48
  Author: heftig
Revision: 310412

304.137-6

Added:
  nvidia-304xx/trunk/kernel-4.14.patch
Modified:
  nvidia-304xx/trunk/PKGBUILD
Deleted:
  nvidia-304xx/trunk/nvidia-304xx.install

--+
 PKGBUILD |   58 -
 kernel-4.14.patch|   29 
 nvidia-304xx.install |   13 --
 3 files changed, 58 insertions(+), 42 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2017-11-18 23:55:38 UTC (rev 310411)
+++ PKGBUILD2017-11-19 00:02:48 UTC (rev 310412)
@@ -5,31 +5,32 @@
 pkgbase=nvidia-304xx
 pkgname=(nvidia-304xx nvidia-304xx-dkms)
 pkgver=304.137
-_extramodules=extramodules-4.13-ARCH
-pkgrel=5
+_extramodules=extramodules-4.14-ARCH
+pkgrel=6
+pkgdesc="NVIDIA drivers for linux, 304xx legacy branch"
 arch=('x86_64')
 url="http://www.nvidia.com/;
-makedepends=('linux' 'linux-headers>=4.13' 'linux-headers<4.14')
+makedepends=("nvidia-304xx-utils=${pkgver}" 'linux' 'linux-headers>=4.14' 
'linux-headers<4.15')
 conflicts=('nvidia')
 license=('custom')
 options=('!strip')
-source=('disable-mtrr.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=('54e8825e523f11706890e09e476498f3a30f75ce4e350ff2ff8a1e1c3af574d9ccfb8903543766b6863d94cdfbf46e68cd3d33380867dd976cafc8dd2dd78774')
-sha512sums_i686=('021c5a88d50489aa0a1c7eac14259e23542b93578ae339995a2e38b786d06d239968c07933cab3fb78a922cffc7e213d6fa3fe07e34065a9c7f03e24f8729370')
-sha512sums_x86_64=('4ab648647e4f3e2c352b2eab6454c264fe4728d8eb1264fafee2a4ab1a4ce59516abcf8490044d31e35309ea951e564cc217e13f7139a48bbf650a4238c5b87c')
+source=("http://us.download.nvidia.com/XFree86/Linux-x86_64/${pkgver}/NVIDIA-Linux-x86_64-${pkgver}-no-compat32.run;
+'disable-mtrr.patch' 'kernel-4.14.patch')
+sha512sums=('4ab648647e4f3e2c352b2eab6454c264fe4728d8eb1264fafee2a4ab1a4ce59516abcf8490044d31e35309ea951e564cc217e13f7139a48bbf650a4238c5b87c'
+
'54e8825e523f11706890e09e476498f3a30f75ce4e350ff2ff8a1e1c3af574d9ccfb8903543766b6863d94cdfbf46e68cd3d33380867dd976cafc8dd2dd78774'
+
'ccaa40e085d985ec4280003e36dd06e60958ed1408867379fd21a68a18d48aa4be311bf9ad1e804f7a7245c90be98e919d2ec30f45d290f1cdb19c866bdb8a8d')
 
-[[ "$CARCH" = "i686" ]] && _pkg="NVIDIA-Linux-x86-${pkgver}"
-[[ "$CARCH" = "x86_64" ]] && _pkg="NVIDIA-Linux-x86_64-${pkgver}-no-compat32"
+_pkg="NVIDIA-Linux-x86_64-${pkgver}-no-compat32"
 
 prepare() {
-cd "${srcdir}"
 sh "${_pkg}.run" --extract-only
 cd "${_pkg}"
+# patches here
 
+patch -Np1 --no-backup-if-mismatch < "${srcdir}/kernel-4.14.patch"
+
 # FS#47092
-#(cd kernel; patch -p1 --no-backup-if-mismatch -i 
"$srcdir"/disable-mtrr.patch)
+#patch -d kernel -Np1 --no-backup-if-mismatch < 
"${srcdir}/disable-mtrr.patch"
 
 cp -a kernel kernel-dkms
 }
@@ -36,36 +37,35 @@
 
 build() {
 _kernver="$(cat /usr/lib/modules/${_extramodules}/version)"
-cd "${_pkg}/kernel"
+cd "${_pkg}"/kernel
 make SYSSRC=/usr/lib/modules/"${_kernver}/build" module
 }
 
 package_nvidia-304xx() {
 pkgdesc="NVIDIA drivers for linux, 304xx legacy branch"
-depends=('linux>=4.13' 'linux<4.14' 'libgl' "nvidia-304xx-utils=${pkgver}")
-conflicts+=('nvidia-304xx-dkms')
-install=nvidia-304xx.install
+depends=('linux>=4.14' 'linux<4.15' "nvidia-304xx-utils=${pkgver}" 'libgl')
 
-install -D -m644 "${srcdir}/${_pkg}/kernel/nvidia.ko" \
-"${pkgdir}/usr/lib/modules/${_extramodules}/nvidia.ko"
-install -d -m755 "${pkgdir}/usr/lib/modprobe.d"
-echo "blacklist nouveau" >> "${pkgdir}/usr/lib/modprobe.d/nvidia.conf"
-sed -i -e "s/EXTRAMODULES='.*'/EXTRAMODULES='${_extramodules}'/" 
"${startdir}/${pkgname}.install"
-gzip "${pkgdir}/usr/lib/modules/${_extramodules}/nvidia.ko"
+install -Dt "${pkgdir}/usr/lib/modules/${_extramodules}" -m644 \
+  "${srcdir}/${_pkg}/kernel"/nvidia.ko
 
-# the license file is part of nvidia-304xx-utils - the module depends on 
it, so we don't ship it another time.
+find "${pkgdir}" -name '*.ko' -exec gzip -n {} +
+
+echo "blacklist nouveau" |
+  install -Dm644 /dev/stdin "${pkgdir}/usr/lib/modprobe.d/nvidia.conf"
 }
 
 package_nvidia-304xx-dkms() {
 pkgdesc="NVIDIA driver sources for linux, 304xx legacy branch"
-depends=('dkms' "nvidia-304xx-utils=$pkgver")
+depends=('dkms' "nvidia-304xx-utils=$pkgver" 'libgl')
 optdepends=('linux-headers: Build the module for Arch kernel'
 'linux-lts-headers: Build the module for LTS Arch kernel')
 conflicts+=('nvidia-304xx')
 
 cd ${_pkg}
-make -C kernel clean
-install -dm 755 "${pkgdir}"/usr/{lib/modprobe.d,src}
-cp -dr 

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

2017-07-13 Thread Jan Steffens
Date: Thursday, July 13, 2017 @ 12:57:47
  Author: heftig
Revision: 300248

304.135-8: kernel 4.12.1

Added:
  nvidia-304xx/trunk/kernel_4.12.patch
Modified:
  nvidia-304xx/trunk/PKGBUILD
  nvidia-304xx/trunk/nvidia-304xx.install

--+
 PKGBUILD |   21 ++
 kernel_4.12.patch|   56 +
 nvidia-304xx.install |2 -
 3 files changed, 69 insertions(+), 10 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2017-07-13 12:57:30 UTC (rev 300247)
+++ PKGBUILD2017-07-13 12:57:47 UTC (rev 300248)
@@ -5,11 +5,11 @@
 pkgbase=nvidia-304xx
 pkgname=(nvidia-304xx nvidia-304xx-dkms)
 pkgver=304.135
-_extramodules=extramodules-4.11-ARCH
-pkgrel=7
+_extramodules=extramodules-4.12-ARCH
+pkgrel=8
 arch=('i686' 'x86_64')
 url="http://www.nvidia.com/;
-makedepends=('linux' 'linux-headers>=4.11' 'linux-headers<4.12')
+makedepends=('linux' 'linux-headers>=4.12' 'linux-headers<4.13')
 conflicts=('nvidia')
 license=('custom')
 options=('!strip')
@@ -16,13 +16,15 @@
 source=('disable-mtrr.patch'
 'drm-driver-legacy.patch'
 'kernel_4.10.patch'
-   'kernel_4.11.patch')
+'kernel_4.11.patch'
+'kernel_4.12.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=('54e8825e523f11706890e09e476498f3a30f75ce4e350ff2ff8a1e1c3af574d9ccfb8903543766b6863d94cdfbf46e68cd3d33380867dd976cafc8dd2dd78774'
 
'fa39dee5c9f1ea98286c87165f683ee194b2cb4056aa6b556e822b9ee760dcf3683ea001c3704e79b9ac9712314d7df5690dc7f68440cda7a96791f94425455d'
 
'68dabbf6ad889c46bd0c01ebb697b80f4aa526ef1cdc53de008343a243adefc6ce7f2778be7005f2d79f3d23c0a3ff69f67ecdb9f97c0feb0ec99405a0c1046a'
-
'da3d1698af8b97e8fc3b6d3c690925e0258f8b6ad26a24f8d32c04a5a82701655208021f9f5af0ce44cb397a7422e2776a05193204bc7e4ac2b98f6e173984ea')
+
'da3d1698af8b97e8fc3b6d3c690925e0258f8b6ad26a24f8d32c04a5a82701655208021f9f5af0ce44cb397a7422e2776a05193204bc7e4ac2b98f6e173984ea'
+
'49aa15fb7321bb9e0ab2a5361b9830ad95c2a8e22cf7b9aaf945fad88b419e791edb8e833849e7846373a1b76ececfcdac8803faed21729c89a3ff0a2d74')
 
sha512sums_i686=('c2645cc9a6f23641d8b6da51e72e203980068c05e365fcc73b32322a6875ce95e81f4e0d893276e14e84e93464488539c16db6b3be04f5324cf7d7a12bb557f8')
 
sha512sums_x86_64=('a5aa48baa75eb267bd193e59328aa5fbc15d41045bb7e97aa1b96b918b9e68a1c1bf95624d9d494336256e0af2c41e188d30fe91be4967084de3387f50d3805c')
 
@@ -36,6 +38,7 @@
 # patches here
 patch -Np1 --no-backup-if-mismatch -i ../kernel_4.10.patch
 patch -Np1 --no-backup-if-mismatch -i ../kernel_4.11.patch
+patch -Np1 --no-backup-if-mismatch -i ../kernel_4.12.patch
 
 # FS#47092
 #(cd kernel; patch -p1 --no-backup-if-mismatch -i 
"$srcdir"/disable-mtrr.patch)
@@ -52,8 +55,8 @@
 
 package_nvidia-304xx() {
 pkgdesc="NVIDIA drivers for linux, 304xx legacy branch"
-depends=('linux>=4.11' 'linux<4.12' 'libgl' "nvidia-304xx-utils=${pkgver}")
-   conflicts+=('nvidia-304xx-dkms')
+depends=('linux>=4.12' 'linux<4.13' 'libgl' "nvidia-304xx-utils=${pkgver}")
+conflicts+=('nvidia-304xx-dkms')
 install=nvidia-304xx.install
 
 install -D -m644 "${srcdir}/${_pkg}/kernel/nvidia.ko" \
@@ -71,10 +74,10 @@
 depends=('dkms' "nvidia-304xx-utils=$pkgver")
 optdepends=('linux-headers: Build the module for Arch kernel'
 'linux-lts-headers: Build the module for LTS Arch kernel')
-   conflicts+=('nvidia-304xx')
+conflicts+=('nvidia-304xx')
 
 cd ${_pkg}
-   make -C kernel clean
+make -C kernel clean
 install -dm 755 "${pkgdir}"/usr/{lib/modprobe.d,src}
 cp -dr --no-preserve='ownership' kernel-dkms 
"${pkgdir}"/usr/src/nvidia-${pkgver}
 echo 'blacklist nouveau' > "${pkgdir}"/usr/lib/modprobe.d/nvidia.conf

Added: kernel_4.12.patch
===
--- kernel_4.12.patch   (rev 0)
+++ kernel_4.12.patch   2017-07-13 12:57:47 UTC (rev 300248)
@@ -0,0 +1,56 @@
+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.0 +0100
 NVIDIA-Linux-x86_64-340.102-new/kernel/conftest.sh 2017-07-05 
20:58:45.28334 +0200
+@@ -362,7 +362,11 @@
+ # Determine if the set_memory_uc() function is present.
+ #
+ CODE="
+-#include 
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
++#include 
++#else
++#include 
++#endif
+ void conftest_set_memory_uc(void) {
+ 

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

2017-05-22 Thread Tobias Powalowski
Date: Monday, May 22, 2017 @ 13:01:50
  Author: tpowa
Revision: 296405

upgpkg: nvidia-304xx 304.135-5

bump to 4.11.2

Added:
  nvidia-304xx/trunk/kernel_4.11.patch
Modified:
  nvidia-304xx/trunk/PKGBUILD
  nvidia-304xx/trunk/nvidia-304xx.install

--+
 PKGBUILD |   15 +--
 kernel_4.11.patch|   44 
 nvidia-304xx.install |2 +-
 3 files changed, 54 insertions(+), 7 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2017-05-22 12:52:43 UTC (rev 296404)
+++ PKGBUILD2017-05-22 13:01:50 UTC (rev 296405)
@@ -5,22 +5,24 @@
 pkgbase=nvidia-304xx
 pkgname=(nvidia-304xx nvidia-304xx-dkms)
 pkgver=304.135
-_extramodules=extramodules-4.10-ARCH
-pkgrel=4
+_extramodules=extramodules-4.11-ARCH
+pkgrel=5
 arch=('i686' 'x86_64')
 url="http://www.nvidia.com/;
-makedepends=('linux' 'linux-headers>=4.10' 'linux-headers<4.11')
+makedepends=('linux' 'linux-headers>=4.11' 'linux-headers<4.12')
 conflicts=('nvidia')
 license=('custom')
 options=('!strip')
 source=('disable-mtrr.patch'
 'drm-driver-legacy.patch'
-'kernel_4.10.patch')
+'kernel_4.10.patch'
+   '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;)
 
sha512sums=('54e8825e523f11706890e09e476498f3a30f75ce4e350ff2ff8a1e1c3af574d9ccfb8903543766b6863d94cdfbf46e68cd3d33380867dd976cafc8dd2dd78774'
 
'fa39dee5c9f1ea98286c87165f683ee194b2cb4056aa6b556e822b9ee760dcf3683ea001c3704e79b9ac9712314d7df5690dc7f68440cda7a96791f94425455d'
-
'68dabbf6ad889c46bd0c01ebb697b80f4aa526ef1cdc53de008343a243adefc6ce7f2778be7005f2d79f3d23c0a3ff69f67ecdb9f97c0feb0ec99405a0c1046a')
+
'68dabbf6ad889c46bd0c01ebb697b80f4aa526ef1cdc53de008343a243adefc6ce7f2778be7005f2d79f3d23c0a3ff69f67ecdb9f97c0feb0ec99405a0c1046a'
+
'da3d1698af8b97e8fc3b6d3c690925e0258f8b6ad26a24f8d32c04a5a82701655208021f9f5af0ce44cb397a7422e2776a05193204bc7e4ac2b98f6e173984ea')
 
sha512sums_i686=('c2645cc9a6f23641d8b6da51e72e203980068c05e365fcc73b32322a6875ce95e81f4e0d893276e14e84e93464488539c16db6b3be04f5324cf7d7a12bb557f8')
 
sha512sums_x86_64=('a5aa48baa75eb267bd193e59328aa5fbc15d41045bb7e97aa1b96b918b9e68a1c1bf95624d9d494336256e0af2c41e188d30fe91be4967084de3387f50d3805c')
 
@@ -33,6 +35,7 @@
 cd "${_pkg}"
 # patches here
 patch -Np1 --no-backup-if-mismatch -i ../kernel_4.10.patch
+patch -Np1 --no-backup-if-mismatch -i ../kernel_4.11.patch
 
 # FS#47092
 #(cd kernel; patch -p1 --no-backup-if-mismatch -i 
"$srcdir"/disable-mtrr.patch)
@@ -49,7 +52,7 @@
 
 package_nvidia-304xx() {
 pkgdesc="NVIDIA drivers for linux, 304xx legacy branch"
-depends=('linux>=4.10' 'linux<4.11' 'libgl' "nvidia-304xx-utils=${pkgver}")
+depends=('linux>=4.11' 'linux<4.12' 'libgl' "nvidia-304xx-utils=${pkgver}")
conflicts+=('nvidia-304xx-dkms')
 install=nvidia-304xx.install
 

Added: kernel_4.11.patch
===
--- kernel_4.11.patch   (rev 0)
+++ kernel_4.11.patch   2017-05-22 13:01:50 UTC (rev 296405)
@@ -0,0 +1,44 @@
+--- a/kernel/nv-drm.c
 b/kernel/nv-drm.c
+@@ -22,6 +22,8 @@
+ #include 
+ #endif
+ 
++#include 
++
+ extern nv_linux_state_t *nv_linux_devices;
+ 
+ static int nv_drm_load(
+@@ -42,7 +44,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
+ )
+ {
+@@ -52,11 +58,19 @@
+ {
+ if (nvl->dev == dev->pdev)
+ {
++#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 const struct file_operations nv_drm_fops = {
+

Modified: nvidia-304xx.install
===
--- nvidia-304xx.install2017-05-22 12:52:43 UTC (rev 296404)
+++ nvidia-304xx.install2017-05-22 13:01:50 UTC (rev 296405)
@@ -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.'
 }


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

2017-02-26 Thread Jan Steffens
Date: Sunday, February 26, 2017 @ 22:23:35
  Author: heftig
Revision: 289582

304.135-2

Added:
  nvidia-304xx/trunk/kernel_4.10.patch
Modified:
  nvidia-304xx/trunk/PKGBUILD
  nvidia-304xx/trunk/nvidia-304xx.install

--+
 PKGBUILD |   15 ---
 kernel_4.10.patch|  105 +
 nvidia-304xx.install |2 
 3 files changed, 115 insertions(+), 7 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2017-02-26 22:21:36 UTC (rev 289581)
+++ PKGBUILD2017-02-26 22:23:35 UTC (rev 289582)
@@ -5,20 +5,22 @@
 pkgbase=nvidia-304xx
 pkgname=(nvidia-304xx nvidia-304xx-dkms)
 pkgver=304.135
-_extramodules=extramodules-4.9-ARCH
-pkgrel=1
+_extramodules=extramodules-4.10-ARCH
+pkgrel=2
 arch=('i686' 'x86_64')
 url="http://www.nvidia.com/;
-makedepends=('linux' 'linux-headers>=4.9' 'linux-headers<4.10')
+makedepends=('linux' 'linux-headers>=4.10' 'linux-headers<4.11')
 conflicts=('nvidia')
 license=('custom')
 options=('!strip')
 source=('disable-mtrr.patch'
-'drm-driver-legacy.patch')
+'drm-driver-legacy.patch'
+'kernel_4.10.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=('54e8825e523f11706890e09e476498f3a30f75ce4e350ff2ff8a1e1c3af574d9ccfb8903543766b6863d94cdfbf46e68cd3d33380867dd976cafc8dd2dd78774'
-
'fa39dee5c9f1ea98286c87165f683ee194b2cb4056aa6b556e822b9ee760dcf3683ea001c3704e79b9ac9712314d7df5690dc7f68440cda7a96791f94425455d')
+
'fa39dee5c9f1ea98286c87165f683ee194b2cb4056aa6b556e822b9ee760dcf3683ea001c3704e79b9ac9712314d7df5690dc7f68440cda7a96791f94425455d'
+
'68dabbf6ad889c46bd0c01ebb697b80f4aa526ef1cdc53de008343a243adefc6ce7f2778be7005f2d79f3d23c0a3ff69f67ecdb9f97c0feb0ec99405a0c1046a')
 
sha512sums_i686=('c2645cc9a6f23641d8b6da51e72e203980068c05e365fcc73b32322a6875ce95e81f4e0d893276e14e84e93464488539c16db6b3be04f5324cf7d7a12bb557f8')
 
sha512sums_x86_64=('a5aa48baa75eb267bd193e59328aa5fbc15d41045bb7e97aa1b96b918b9e68a1c1bf95624d9d494336256e0af2c41e188d30fe91be4967084de3387f50d3805c')
 
@@ -30,6 +32,7 @@
 sh "${_pkg}.run" --extract-only
 cd "${_pkg}"
 # patches here
+patch -Np1 --no-backup-if-mismatch -i ../kernel_4.10.patch
 
 # FS#47092
 #(cd kernel; patch -p1 --no-backup-if-mismatch -i 
"$srcdir"/disable-mtrr.patch)
@@ -46,7 +49,7 @@
 
 package_nvidia-304xx() {
 pkgdesc="NVIDIA drivers for linux, 304xx legacy branch"
-depends=('linux>=4.9' 'linux<4.10' 'libgl' "nvidia-304xx-utils=${pkgver}")
+depends=('linux>=4.10' 'linux<4.11' 'libgl' "nvidia-304xx-utils=${pkgver}")
conflicts+=('nvidia-304xx-dkms')
 install=nvidia-304xx.install
 

Added: kernel_4.10.patch
===
--- kernel_4.10.patch   (rev 0)
+++ kernel_4.10.patch   2017-02-26 22:23:35 UTC (rev 289582)
@@ -0,0 +1,105 @@
+From d270372bf8abcf45409b30cdb33069280527b0ff Mon Sep 17 00:00:00 2001
+From: Alberto Milone 
+Date: Wed, 15 Feb 2017 18:01:02 +0100
+Subject: [PATCH 1/1] Add support for Linux 4.10
+
+---
+ nv-linux.h |  5 +
+ nv-pat.c   | 40 
+ 2 files changed, 45 insertions(+)
+
+diff --git a/kernel/nv-linux.h b/kernel/nv-linux.h
+index b46e71f..3081c06 100644
+--- a/kernel/nv-linux.h
 b/kernel/nv-linux.h
+@@ -1895,8 +1895,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 e71e81c..d742789 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
+ nv_kern_cpu_callback(struct notifier_block *nfb, unsigned long action, void 
*hcpu)
+ {
+@@ -234,6 +235,34 @@ static struct notifier_block nv_hotcpu_nfb = {
+ .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 

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

2015-11-17 Thread Felix Yan
Date: Tuesday, November 17, 2015 @ 13:22:48
  Author: fyan
Revision: 251121

upgpkg: nvidia-304xx 304.131-1

Modified:
  nvidia-304xx/trunk/PKGBUILD
Deleted:
  nvidia-304xx/trunk/nv-drm.patch
  nvidia-304xx/trunk/nvidia-4.3-build.patch

+
 PKGBUILD   |   18 ++
 nv-drm.patch   |   27 ---
 nvidia-4.3-build.patch |   20 
 3 files changed, 6 insertions(+), 59 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2015-11-17 12:15:21 UTC (rev 251120)
+++ PKGBUILD2015-11-17 12:22:48 UTC (rev 251121)
@@ -4,23 +4,19 @@
 
 pkgbase=nvidia-304xx
 pkgname=(nvidia-304xx nvidia-304xx-dkms)
-pkgver=304.128
+pkgver=304.131
 _extramodules=extramodules-4.3-ARCH
-pkgrel=5
+pkgrel=1
 arch=('i686' 'x86_64')
 url="http://www.nvidia.com/;
 makedepends=('nvidia-304xx-libgl' "nvidia-304xx-utils=${pkgver}" 'linux' 
'linux-headers>=4.3' 'linux-headers<4.4')
 conflicts=('nvidia')
 license=('custom')
-options=(!strip)
+options=('!strip')
 
source=("http://us.download.nvidia.com/XFree86/Linux-x86/${pkgver}/NVIDIA-Linux-x86-${pkgver}.run;
-
"http://us.download.nvidia.com/XFree86/Linux-x86_64/${pkgver}/NVIDIA-Linux-x86_64-${pkgver}-no-compat32.run;
-'nv-drm.patch'
-'nvidia-4.3-build.patch')
-sha512sums=('9822b61872ae28751cd5c41714048612f7ddf0fd9f02e6340598150afbea43dddeba88482a8c88bcf893b015d14b2a2cf5157ed60583da57fdfe183ecb620c90'
-
'fa7a81edaba92561314b4874635e639607cf2f9bcde10609764528a35bb2d4a6916c7ea2be2cdcb9e2abf5ac7455f54287ff7218f3e57acc67bdeae18a208db2'
-
'aaa36ef7179acdc86850381de145a3aebab22273cd3c702a9d1343dc3415192c74a35da692312555f36193c5d46a1771ce07ea9508113cb9d0698873064aa19f'
-
'fe2db48834d73babc715aef394be9181256805b7bb3df34d1ca226bcb5cb19b36ba95c5df532438b08c1f83ab6921991ef44d04f672c177895f9b009219a1fb3')
+
"http://us.download.nvidia.com/XFree86/Linux-x86_64/${pkgver}/NVIDIA-Linux-x86_64-${pkgver}-no-compat32.run;)
+sha512sums=('3e67c40648554dc49472081eee88ae982c3b235b3346e4d9e7fb5ae33ec5f10ed088da804ac7d8bd1565995df3861f12b3560030cd3a19339a2d35768b0a943e'
+
'07e529e4e81c42b43861475029aa0f223f8f3d299be9ddfe820c583e26aae49223a9b0dfee6d66ab09c526554bb581e5f8cf755eda600cb9e0bdac7d5f4acb93')
 
 [[ "$CARCH" = "i686" ]] && _pkg="NVIDIA-Linux-x86-${pkgver}"
 [[ "$CARCH" = "x86_64" ]] && _pkg="NVIDIA-Linux-x86_64-${pkgver}-no-compat32"
@@ -30,8 +26,6 @@
 sh "${_pkg}.run" --extract-only
 cd "${_pkg}"
 # patches here
-patch -p0 -i "$srcdir/nv-drm.patch"
-patch -Np1 -i "$srcdir/nvidia-4.3-build.patch"
 }
 
 build() {

Deleted: nv-drm.patch
===
--- nv-drm.patch2015-11-17 12:15:21 UTC (rev 251120)
+++ nv-drm.patch2015-11-17 12:22:48 UTC (rev 251121)
@@ -1,27 +0,0 @@
 kernel/nv-drm.c~ 2014-09-12 00:33:06.0 +0200
-+++ kernel/nv-drm.c 2014-10-14 11:35:52.854400737 +0200
-@@ -18,6 +18,11 @@
-
- #include 
-
-+/* 3.18-rc0+ */
-+#ifndef drm_gem_object
-+#include 
-+#endif
-+
- extern nv_linux_state_t *nv_linux_devices;
-
- struct nv_gem_object {
-diff --git a/kernel/nv-drm.c~ b/kernel/nv-drm.c
-index ecc982a..60d7aae 100644
 kernel/nv-drm.c~
-+++ kernel/nv-drm.c
-@@ -129,6 +129,8 @@ static struct drm_driver nv_drm_driver = {
- .gem_prime_vmap = nv_gem_prime_vmap,
- .gem_prime_vunmap = nv_gem_prime_vunmap,
-
-+.set_busid = drm_pci_set_busid,
-+
- .name = "nvidia-drm",
- .desc = "NVIDIA DRM driver",
- .date = "20130102",

Deleted: nvidia-4.3-build.patch
===
--- nvidia-4.3-build.patch  2015-11-17 12:15:21 UTC (rev 251120)
+++ nvidia-4.3-build.patch  2015-11-17 12:22:48 UTC (rev 251121)
@@ -1,20 +0,0 @@
 a/kernel/nv-procfs.c
-+++ b/kernel/nv-procfs.c
-@@ -360,7 +360,8 @@ nv_procfs_read_registry(
- registry_keys = ((nvl != NULL) ?
- nvl->registry_keys : nv_registry_keys);
- 
--return seq_printf(s, "Binary: \"%s\"\n", registry_keys);
-+seq_printf(s, "Binary: \"%s\"\n", registry_keys);
-+return 0;
- }
- 
- static ssize_t
-@@ -560,7 +561,8 @@ nv_procfs_read_text_file(
- void *v
- )
- {
--return seq_puts(s, s->private);
-+seq_puts(s, s->private);
-+return 0;
- }


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

2015-11-04 Thread Tobias Powalowski
Date: Wednesday, November 4, 2015 @ 16:12:51
  Author: tpowa
Revision: 250104

upgpkg: nvidia-304xx 304.128-5

rebuild against 4.3 series

Added:
  nvidia-304xx/trunk/nvidia-4.3-build.patch
Modified:
  nvidia-304xx/trunk/PKGBUILD
  nvidia-304xx/trunk/nvidia-304xx.install

+
 PKGBUILD   |   15 +--
 nvidia-304xx.install   |2 +-
 nvidia-4.3-build.patch |   20 
 3 files changed, 30 insertions(+), 7 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2015-11-04 15:08:26 UTC (rev 250103)
+++ PKGBUILD2015-11-04 15:12:51 UTC (rev 250104)
@@ -5,20 +5,22 @@
 pkgbase=nvidia-304xx
 pkgname=(nvidia-304xx nvidia-304xx-dkms)
 pkgver=304.128
-_extramodules=extramodules-4.2-ARCH
-pkgrel=4
+_extramodules=extramodules-4.3-ARCH
+pkgrel=5
 arch=('i686' 'x86_64')
 url="http://www.nvidia.com/;
-makedepends=('nvidia-304xx-libgl' "nvidia-304xx-utils=${pkgver}" 'linux' 
'linux-headers>=4.2' 'linux-headers<4.3')
+makedepends=('nvidia-304xx-libgl' "nvidia-304xx-utils=${pkgver}" 'linux' 
'linux-headers>=4.3' 'linux-headers<4.4')
 conflicts=('nvidia')
 license=('custom')
 options=(!strip)
 
source=("http://us.download.nvidia.com/XFree86/Linux-x86/${pkgver}/NVIDIA-Linux-x86-${pkgver}.run;
 
"http://us.download.nvidia.com/XFree86/Linux-x86_64/${pkgver}/NVIDIA-Linux-x86_64-${pkgver}-no-compat32.run;
-'nv-drm.patch')
+'nv-drm.patch'
+'nvidia-4.3-build.patch')
 
sha512sums=('9822b61872ae28751cd5c41714048612f7ddf0fd9f02e6340598150afbea43dddeba88482a8c88bcf893b015d14b2a2cf5157ed60583da57fdfe183ecb620c90'
 
'fa7a81edaba92561314b4874635e639607cf2f9bcde10609764528a35bb2d4a6916c7ea2be2cdcb9e2abf5ac7455f54287ff7218f3e57acc67bdeae18a208db2'
-
'aaa36ef7179acdc86850381de145a3aebab22273cd3c702a9d1343dc3415192c74a35da692312555f36193c5d46a1771ce07ea9508113cb9d0698873064aa19f')
+
'aaa36ef7179acdc86850381de145a3aebab22273cd3c702a9d1343dc3415192c74a35da692312555f36193c5d46a1771ce07ea9508113cb9d0698873064aa19f'
+
'fe2db48834d73babc715aef394be9181256805b7bb3df34d1ca226bcb5cb19b36ba95c5df532438b08c1f83ab6921991ef44d04f672c177895f9b009219a1fb3')
 
 [[ "$CARCH" = "i686" ]] && _pkg="NVIDIA-Linux-x86-${pkgver}"
 [[ "$CARCH" = "x86_64" ]] && _pkg="NVIDIA-Linux-x86_64-${pkgver}-no-compat32"
@@ -29,6 +31,7 @@
 cd "${_pkg}"
 # patches here
 patch -p0 -i "$srcdir/nv-drm.patch"
+patch -Np1 -i "$srcdir/nvidia-4.3-build.patch"
 }
 
 build() {
@@ -39,7 +42,7 @@
 
 package_nvidia-304xx() {
 pkgdesc="NVIDIA drivers for linux, 304xx legacy branch"
-depends=('linux>=4.2' 'linux<4.3' 'libgl' "nvidia-304xx-utils=${pkgver}")
+depends=('linux>=4.3' 'linux<4.4' 'libgl' "nvidia-304xx-utils=${pkgver}")
conflicts+=('nvidia-304xx-dkms')
 install=nvidia-304xx.install
 

Modified: nvidia-304xx.install
===
--- nvidia-304xx.install2015-11-04 15:08:26 UTC (rev 250103)
+++ nvidia-304xx.install2015-11-04 15:12:51 UTC (rev 250104)
@@ -1,5 +1,5 @@
 post_install() {
-EXTRAMODULES='extramodules-4.2-ARCH'
+EXTRAMODULES='extramodules-4.3-ARCH'
 depmod $(cat /usr/lib/modules/$EXTRAMODULES/version)
 echo 'In order to use nvidia module, reboot the system.'
 }

Added: nvidia-4.3-build.patch
===
--- nvidia-4.3-build.patch  (rev 0)
+++ nvidia-4.3-build.patch  2015-11-04 15:12:51 UTC (rev 250104)
@@ -0,0 +1,20 @@
+--- a/kernel/nv-procfs.c
 b/kernel/nv-procfs.c
+@@ -360,7 +360,8 @@ nv_procfs_read_registry(
+ registry_keys = ((nvl != NULL) ?
+ nvl->registry_keys : nv_registry_keys);
+ 
+-return seq_printf(s, "Binary: \"%s\"\n", registry_keys);
++seq_printf(s, "Binary: \"%s\"\n", registry_keys);
++return 0;
+ }
+ 
+ static ssize_t
+@@ -560,7 +561,8 @@ nv_procfs_read_text_file(
+ void *v
+ )
+ {
+-return seq_puts(s, s->private);
++seq_puts(s, s->private);
++return 0;
+ }


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

2015-09-02 Thread Felix Yan
Date: Wednesday, September 2, 2015 @ 10:59:50
  Author: fyan
Revision: 245191

upgpkg: nvidia-304xx 304.128-1

Modified:
  nvidia-304xx/trunk/PKGBUILD
Deleted:
  nvidia-304xx/trunk/nvidia-3.19.patch
  nvidia-304xx/trunk/nvidia-4.0.patch

---+
 PKGBUILD  |   18 ++
 nvidia-3.19.patch |   21 -
 nvidia-4.0.patch  |   28 
 3 files changed, 6 insertions(+), 61 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2015-09-02 08:40:30 UTC (rev 245190)
+++ PKGBUILD2015-09-02 08:59:50 UTC (rev 245191)
@@ -4,9 +4,9 @@
 
 pkgbase=nvidia-304xx
 pkgname=(nvidia-304xx nvidia-304xx-dkms)
-pkgver=304.125
+pkgver=304.128
 _extramodules=extramodules-4.1-ARCH
-pkgrel=23
+pkgrel=1
 arch=('i686' 'x86_64')
 url="http://www.nvidia.com/;
 makedepends=('libgl' "nvidia-304xx-utils=${pkgver}" 'linux' 
'linux-headers>=4.1' 'linux-headers<4.2')
@@ -15,14 +15,10 @@
 options=(!strip)
 
source=("http://us.download.nvidia.com/XFree86/Linux-x86/${pkgver}/NVIDIA-Linux-x86-${pkgver}.run;
 
"http://us.download.nvidia.com/XFree86/Linux-x86_64/${pkgver}/NVIDIA-Linux-x86_64-${pkgver}-no-compat32.run;
-'nv-drm.patch'
-'nvidia-3.19.patch'
-'nvidia-4.0.patch')
-sha512sums=('cd77736790876b66c1e88bf30b7a93f755c0f94118edda8fde1701dc07dc4eb60f89a27b0ed432db74729f269cb239f32f3c5e045d701f60baf69da7fc0d0ea7'
-
'3b50d1353ff6cfee9042455b78e889c198e40dfe832dde79eda1a47d9f1f02b29f0161f1ac694dc7502eb2a94bad6b98244568cc353f387b02de6cae1c17d4ae'
-
'aaa36ef7179acdc86850381de145a3aebab22273cd3c702a9d1343dc3415192c74a35da692312555f36193c5d46a1771ce07ea9508113cb9d0698873064aa19f'
-
'f52a9f82a73eef9e27046c51ce0b2671ee2893f9b12e17c722f17416c39ac0b8d7d5b1fed51b6ab6f36670b036cd96d5cfeae37300ef041c029fd3d3d136ff3d'
-
'd00a2a4c5bf38041cf9e4f61aa0ad0d6123451839eb272c36d7e466d77b33d90415cfa6f96a3a9da8688a1048e93a03169f808e6b2ddc2d9d148bab8485dae27')
+'nv-drm.patch')
+sha512sums=('9822b61872ae28751cd5c41714048612f7ddf0fd9f02e6340598150afbea43dddeba88482a8c88bcf893b015d14b2a2cf5157ed60583da57fdfe183ecb620c90'
+
'fa7a81edaba92561314b4874635e639607cf2f9bcde10609764528a35bb2d4a6916c7ea2be2cdcb9e2abf5ac7455f54287ff7218f3e57acc67bdeae18a208db2'
+
'aaa36ef7179acdc86850381de145a3aebab22273cd3c702a9d1343dc3415192c74a35da692312555f36193c5d46a1771ce07ea9508113cb9d0698873064aa19f')
 
 [[ "$CARCH" = "i686" ]] && _pkg="NVIDIA-Linux-x86-${pkgver}"
 [[ "$CARCH" = "x86_64" ]] && _pkg="NVIDIA-Linux-x86_64-${pkgver}-no-compat32"
@@ -33,8 +29,6 @@
 cd "${_pkg}"
 # patches here
 patch -p0 -i "$srcdir/nv-drm.patch"
-patch -p1 -i "$srcdir/nvidia-3.19.patch"
-patch -p0 -i "$srcdir/nvidia-4.0.patch"
 }
 
 build() {

Deleted: nvidia-3.19.patch
===
--- nvidia-3.19.patch   2015-09-02 08:40:30 UTC (rev 245190)
+++ nvidia-3.19.patch   2015-09-02 08:59:50 UTC (rev 245191)
@@ -1,21 +0,0 @@
-diff -Npur NVIDIA-Linux-x86_64-304.orig/kernel/nv.c 
NVIDIA-Linux-x86_64-304.125-no-compat32/kernel/nv.c
 NVIDIA-Linux-x86_64-304.orig/kernel/nv.c   2014-12-02 04:58:34.0 
+0100
-+++ NVIDIA-Linux-x86_64-304.125-no-compat32/kernel/nv.c2014-12-21 
17:50:33.420697348 +0100
-@@ -2026,7 +2026,7 @@ long nv_kern_unlocked_ioctl(
- unsigned long i_arg
- )
- {
--return nv_kern_ioctl(file->f_dentry->d_inode, file, cmd, i_arg);
-+return nv_kern_ioctl(file->f_path.dentry->d_inode, file, cmd, i_arg);
- }
- 
- long nv_kern_compat_ioctl(
-@@ -2035,7 +2035,7 @@ long nv_kern_compat_ioctl(
- unsigned long i_arg
- )
- {
--return nv_kern_ioctl(file->f_dentry->d_inode, file, cmd, i_arg);
-+return nv_kern_ioctl(file->f_path.dentry->d_inode, file, cmd, i_arg);
- }
- 
- /*

Deleted: nvidia-4.0.patch
===
--- nvidia-4.0.patch2015-09-02 08:40:30 UTC (rev 245190)
+++ nvidia-4.0.patch2015-09-02 08:59:50 UTC (rev 245191)
@@ -1,28 +0,0 @@
 kernel/nv-pat.c~ 2015-02-22 20:39:43.889075396 -0800
-+++ kernel/nv-pat.c 2015-02-22 20:29:33.519735577 -0800
-@@ -35,8 +35,13 @@
- unsigned long cr0 = read_cr0();
- write_cr0(((cr0 & (0xdfff)) | 0x4000));
- wbinvd();
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0)
-+*cr4 = __read_cr4();
-+if (*cr4 & 0x80) __write_cr4(*cr4 & ~0x80);
-+#else
- *cr4 = read_cr4();
- if (*cr4 & 0x80) write_cr4(*cr4 & ~0x80);
-+#endif
- __flush_tlb();
- }
- 
-@@ -46,7 +46,11 @@
- wbinvd();
- __flush_tlb();
- write_cr0((cr0 & 0x9fff));
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0)
-+if (cr4 & 0x80) __write_cr4(cr4);
-+#else
- if (cr4 & 0x80) write_cr4(cr4);
-+#endif
- }
- 
- static int nv_determine_pat_mode(void)


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

2013-07-04 Thread Tobias Powalowski
Date: Thursday, July 4, 2013 @ 12:04:51
  Author: tpowa
Revision: 189660

upgpkg: nvidia-304xx 304.88-11

rebuild against 3.10

Added:
  nvidia-304xx/trunk/nvidia-linux-3.10.patch
Modified:
  nvidia-304xx/trunk/PKGBUILD
  nvidia-304xx/trunk/nvidia.install

-+
 PKGBUILD|   15 -
 nvidia-linux-3.10.patch |  633 ++
 nvidia.install  |6 
 3 files changed, 646 insertions(+), 8 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2013-07-04 08:30:44 UTC (rev 189659)
+++ PKGBUILD2013-07-04 10:04:51 UTC (rev 189660)
@@ -3,17 +3,19 @@
 
 pkgname=nvidia-304xx
 pkgver=304.88
-_extramodules=extramodules-3.9-ARCH
-pkgrel=10
+_extramodules=extramodules-3.10-ARCH
+pkgrel=11
 pkgdesc=NVIDIA drivers for linux, 304xx legacy branch
 arch=('i686' 'x86_64')
 url=http://www.nvidia.com/;
-depends=('linux=3.9' 'linux3.10' nvidia-304xx-utils=${pkgver})
-makedepends=('linux-headers=3.9' 'linux-headers3.10')
+depends=('linux=3.10' 'linux3.11' nvidia-304xx-utils=${pkgver})
+makedepends=('linux-headers=3.10' 'linux-headers3.11')
 conflicts=('nvidia' 'nvidia-96xx' 'nvidia-173xx')
 license=('custom')
 install=nvidia.install
 options=(!strip)
+source=('nvidia-linux-3.10.patch')
+md5sums=('f12bb3f5829b979a0d79e68b78c2ba6a')
 
 if [ $CARCH = i686 ]; then
 _arch='x86'
@@ -27,11 +29,15 @@
 md5sums+=('35e0c7d30de795cccb6b95bda991fb77')
 fi
 
+
 build() {
 _kernver=$(cat /usr/lib/modules/${_extramodules}/version)
 cd ${srcdir}
 sh ${_pkg}.run --extract-only
 cd ${_pkg}/kernel
+### Derived from the linux-3.10 patch:
+### This patch removes AGP additional from /proc, I don't think this is 
correct but it makes it compile.
+patch -Np2 -i ${srcdir}/nvidia-linux-3.10.patch
 make SYSSRC=/usr/lib/modules/${_kernver}/build module
 }
 
@@ -43,4 +49,3 @@
 sed -i -e s/EXTRAMODULES='.*'/EXTRAMODULES='${_extramodules}'/ 
${startdir}/nvidia.install
 gzip ${pkgdir}/usr/lib/modules/${_extramodules}/nvidia.ko
 }
-

Added: nvidia-linux-3.10.patch
===
--- nvidia-linux-3.10.patch (rev 0)
+++ nvidia-linux-3.10.patch 2013-07-04 10:04:51 UTC (rev 189660)
@@ -0,0 +1,633 @@
+--- NVIDIA-Linux-x86_64-319.17-no-compat32.orig/kernel/nv-i2c.c
2013-04-26 00:22:30.0 -0400
 NVIDIA-Linux-x86_64-319.17-no-compat32/kernel/nv-i2c.c 2013-05-13 
05:20:55.571981365 -0400
+@@ -311,8 +311,6 @@
+ BOOL NV_API_CALL nv_i2c_del_adapter(nv_state_t *nv, void *data)
+ {
+ struct i2c_adapter *pI2cAdapter = (struct i2c_adapter *)data;
+-int osstatus = 0;
+-BOOL wasReleased = FALSE;
+ 
+ #if defined(KERNEL_2_4)
+ if (!NV_WEAK_SYMBOL_PRESENT(i2c_add_adapter))
+@@ -324,15 +322,10 @@
+ if (!pI2cAdapter) return FALSE;
+ 
+ // attempt release with the OS
+-osstatus = i2c_del_adapter(pI2cAdapter);
++i2c_del_adapter(pI2cAdapter);
++os_free_mem(pI2cAdapter);
+ 
+-if (!osstatus)
+-{
+-os_free_mem(pI2cAdapter);
+-wasReleased = TRUE;
+-}
+-
+-return wasReleased;
++return TRUE;
+ }
+ 
+ #else // (defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE))
+diff -ur -X - NVIDIA-Linux-x86_64-319.17-no-compat32.orig/kernel/nv-procfs.c 
NVIDIA-Linux-x86_64-319.17-no-compat32/kernel/nv-procfs.c
+--- NVIDIA-Linux-x86_64-319.17-no-compat32.orig/kernel/nv-procfs.c 
2013-04-26 00:22:30.0 -0400
 NVIDIA-Linux-x86_64-319.17-no-compat32/kernel/nv-procfs.c  2013-05-22 
04:52:45.229495748 -0400
+@@ -60,60 +60,41 @@
+ __entry;  \
+ })
+ 
+-#define NV_CREATE_PROC_FILE(name,parent,__read_proc,   \
+-__write_proc,__fops,__data)\
+-   ({  \
+-struct proc_dir_entry *__entry;\
+-int __mode = (S_IFREG | S_IRUGO);  \
+-if ((NvUPtr)(__write_proc) != 0)   \
+-__mode |= S_IWUSR; \
+-__entry = NV_CREATE_PROC_ENTRY(name, __mode, parent);  \
+-if (__entry != NULL)   \
+-{  \
+-if ((NvUPtr)(__read_proc) != 0)\
+-__entry-read_proc = (__read_proc);\
+-if ((NvUPtr)(__write_proc) != 0)   \
+-{  \
+-__entry-write_proc = (__write_proc);  \
+-__entry-proc_fops = (__fops); \
+-}  \
+-__entry-data = (__data);  \
+-}

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

2013-02-20 Thread Evangelos Foutras
Date: Wednesday, February 20, 2013 @ 10:25:36
  Author: foutrelis
Revision: 178329

Use more generic patch for building against Linux 3.7.6+.

Added:
  nvidia-304xx/trunk/linux-3.7.patch
Modified:
  nvidia-304xx/trunk/PKGBUILD
Deleted:
  nvidia-304xx/trunk/linux-3.7.6.patch

---+
 PKGBUILD  |   22 +-
 linux-3.7.6.patch |   11 ---
 linux-3.7.patch   |   24 
 3 files changed, 33 insertions(+), 24 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2013-02-20 09:19:23 UTC (rev 178328)
+++ PKGBUILD2013-02-20 09:25:36 UTC (rev 178329)
@@ -14,25 +14,21 @@
 license=('custom')
 install=nvidia.install
 options=(!strip)
+source=('linux-3.7.patch'
+'uapi-3.7.patch')
+md5sums=('7c684fab691b15d55a79fd8f9b1a224d'
+ '502d00dc850148d61fc06c907601498e')
 
 if [ $CARCH = i686 ]; then
 _arch='x86'
 _pkg=NVIDIA-Linux-${_arch}-${pkgver}
-
source=(ftp://download.nvidia.com/XFree86/Linux-${_arch}/${pkgver}/${_pkg}.run;
-'uapi-3.7.patch'
-linux-3.7.6.patch)
-md5sums=('6964415cf648a5f4f38117b168369de2'
- '502d00dc850148d61fc06c907601498e'
- '2627107ebbd930389b00a9a2cd5e6f42')
+
source+=(ftp://download.nvidia.com/XFree86/Linux-${_arch}/${pkgver}/${_pkg}.run;)
+md5sums+=('6964415cf648a5f4f38117b168369de2')
 elif [ $CARCH = x86_64 ]; then
 _arch='x86_64'
_pkg=NVIDIA-Linux-${_arch}-${pkgver}-no-compat32
-
source=(ftp://download.nvidia.com/XFree86/Linux-${_arch}/${pkgver}/${_pkg}.run;
-'uapi-3.7.patch'
-linux-3.7.6.patch)
-md5sums=('76007ed4b72afd334e26377b646f5f7e'
- '502d00dc850148d61fc06c907601498e'
- '2627107ebbd930389b00a9a2cd5e6f42')
+
source+=(ftp://download.nvidia.com/XFree86/Linux-${_arch}/${pkgver}/${_pkg}.run;)
+md5sums+=('76007ed4b72afd334e26377b646f5f7e')
 fi
 
 build() {
@@ -41,7 +37,7 @@
 sh ${_pkg}.run --extract-only
 cd ${_pkg}/kernel
 patch -Np0 -i ${srcdir}/uapi-3.7.patch
-patch -Np3 -i ${srcdir}/linux-3.7.6.patch
+patch -Np3 -i ${srcdir}/linux-3.7.patch
 make SYSSRC=/usr/lib/modules/${_kernver}/build module
 }
 

Deleted: linux-3.7.6.patch
===
--- linux-3.7.6.patch   2013-02-20 09:19:23 UTC (rev 178328)
+++ linux-3.7.6.patch   2013-02-20 09:25:36 UTC (rev 178329)
@@ -1,11 +0,0 @@
 a/NVIDIA-Linux-x86_64-313.18-no-compat32/kernel/conftest.sh
2013-02-04 15:10:20.669633666 -0500
-+++ b/NVIDIA-Linux-x86_64-313.18-no-compat32/kernel/conftest.sh
2013-02-04 15:10:34.283334673 -0500
-@@ -1701,7 +1701,7 @@
- SUBLEVEL=$(grep ^SUBLEVEL = $MAKEFILE | cut -d   -f 3)
- 
- if [ -n $PATCHLEVEL -a $PATCHLEVEL -ge 6 \
---a -n $SUBLEVEL -a $SUBLEVEL -le 5 ]; then
-+-a -n $SUBLEVEL -a $SUBLEVEL -le 6 ]; then
- SELECTED_MAKEFILE=Makefile.kbuild
- RET=0
- fi

Added: linux-3.7.patch
===
--- linux-3.7.patch (rev 0)
+++ linux-3.7.patch 2013-02-20 09:25:36 UTC (rev 178329)
@@ -0,0 +1,24 @@
+the nvidia drivers are trying to test for version 2.6.6, but fail to take into
+account the first digit.  so 3.7.0+ ends up failing the test.
+
+https://bugs.gentoo.org/447566
+
+--- a/NVIDIA-Linux-x86_64-313.18-no-compat32/kernel/conftest.sh
2013-02-04 15:10:20.669633666 -0500
 b/NVIDIA-Linux-x86_64-313.18-no-compat32/kernel/conftest.sh
2013-02-04 15:10:34.283334673 -0500
+@@ -1697,13 +1697,15 @@
+ # kernel older than 2.6.6, that's all we require to
+ # build the module.
+ #
++VERSION=$(grep ^VERSION = $MAKEFILE | cut -d   -f 3)
+ PATCHLEVEL=$(grep ^PATCHLEVEL = $MAKEFILE | cut -d   -f 3)
+ SUBLEVEL=$(grep ^SUBLEVEL = $MAKEFILE | cut -d   -f 3)
+ 
+-if [ -n $PATCHLEVEL -a $PATCHLEVEL -ge 6 \
++if [ -n $VERSION -a $VERSION -ge 3 ] || \
++   [ -n $PATCHLEVEL -a $PATCHLEVEL -ge 6 \
+ -a -n $SUBLEVEL -a $SUBLEVEL -le 5 ]; then
+ SELECTED_MAKEFILE=Makefile.kbuild
+ RET=0
+ fi
+ fi
+ fi