[arch-commits] Commit in nvidia/trunk (PKGBUILD nvidia_3.13_kernel.patch)

Thomas Bächler thomas at nymeria.archlinux.org
Sun Jan 26 10:31:49 UTC 2014


    Date: Sunday, January 26, 2014 @ 11:31:48
  Author: thomas
Revision: 204736

Update for 3.13.

Added:
  nvidia/trunk/nvidia_3.13_kernel.patch
Modified:
  nvidia/trunk/PKGBUILD

--------------------------+
 PKGBUILD                 |   13 ++++++------
 nvidia_3.13_kernel.patch |   46 +++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 53 insertions(+), 6 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2014-01-26 09:52:45 UTC (rev 204735)
+++ PKGBUILD	2014-01-26 10:31:48 UTC (rev 204736)
@@ -3,19 +3,19 @@
 
 pkgname=nvidia
 pkgver=331.38
-_extramodules=extramodules-3.12-ARCH
-pkgrel=2
+_extramodules=extramodules-3.13-ARCH
+pkgrel=3
 pkgdesc="NVIDIA drivers for linux"
 arch=('i686' 'x86_64')
 url="http://www.nvidia.com/"
-depends=('linux>=3.12' 'linux<3.13' "nvidia-libgl" "nvidia-utils=${pkgver}")
-makedepends=('linux-headers>=3.12' 'linux-headers<3.13')
+depends=('linux>=3.13' 'linux<3.14' "nvidia-libgl" "nvidia-utils=${pkgver}")
+makedepends=('linux-headers>=3.13' 'linux-headers<3.14')
 conflicts=('nvidia-96xx' 'nvidia-173xx')
 license=('custom')
 install=nvidia.install
 options=(!strip)
-#source=('nvidia-linux-3.12.patch')
-#md5sums=('d267069bc456de269424b4e1b46a3745')
+source=('nvidia_3.13_kernel.patch')
+md5sums=('90fc2d263157fa672fc8d1eb0309cb3a')
 
 if [ "$CARCH" = "i686" ]; then
     _arch='x86'
@@ -33,6 +33,7 @@
     cd "${srcdir}"
     sh "${_pkg}.run" --extract-only
     cd "${_pkg}"
+    patch -p1 -i "${srcdir}"/nvidia_3.13_kernel.patch
 }
 
 build() {

Added: nvidia_3.13_kernel.patch
===================================================================
--- nvidia_3.13_kernel.patch	                        (rev 0)
+++ nvidia_3.13_kernel.patch	2014-01-26 10:31:48 UTC (rev 204736)
@@ -0,0 +1,46 @@
+--- a/kernel/nv-acpi.c
++++ b/kernel/nv-acpi.c
+@@ -15,6 +15,10 @@
+ #include "nv-linux.h"
+ #include "nv-reg.h"
+ 
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 13, 0) && defined(ACPI_HANDLE)
++#define DEVICE_ACPI_HANDLE(a) ACPI_HANDLE(a)
++#endif
++
+ #if defined(NV_LINUX_ACPI_EVENTS_SUPPORTED)
+ static RM_STATUS   nv_acpi_extract_integer (const union acpi_object *, void *, NvU32, NvU32 *);
+ static RM_STATUS   nv_acpi_extract_buffer  (const union acpi_object *, void *, NvU32, NvU32 *);
+@@ -303,7 +307,10 @@ static int nv_acpi_remove(struct acpi_de
+ 
+     if (pNvAcpiObject->notify_handler_installed)
+     {
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0)
++ /* beginning with 3.13, acpi_remove_notify_handler() waits for events to finish */
+         NV_ACPI_OS_WAIT_EVENTS_COMPLETE();
++#endif
+ 
+         // remove event notifier
+         status = acpi_remove_notify_handler(device->handle, ACPI_DEVICE_NOTIFY, nv_acpi_event);
+--- a/kernel/uvm/nvidia_uvm_linux.h
++++ b/kernel/uvm/nvidia_uvm_linux.h
+@@ -405,11 +405,17 @@ typedef void irqreturn_t;
+ // not require the RCU's read lock on current->cred.
+ //
+ //
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 5, 0)
++#define NV_KUID_TO_UID(value) (__kuid_val(value))
++#else
++#define NV_KUID_TO_UID(value) (value)
++#endif
++
+ #if defined(NV_TASK_STRUCT_HAS_CRED)
+ #define NV_CURRENT_EUID() \
+-    (((typeof(*current->cred) __force __kernel *)current->cred)->euid)
++        NV_KUID_TO_UID(((typeof(*current->cred) __force __kernel *)current->cred)->euid)
+ #else
+-#define NV_CURRENT_EUID() (current->euid)
++#define NV_CURRENT_EUID() NV_KUID_TO_UID(current->euid)
+ #endif
+ 
+ #define NV_ATOMIC_SET(data,val)         atomic_set(&(data), (val))




More information about the arch-commits mailing list