diff options
Diffstat (limited to 'x11-drivers/nvidia-drivers/files')
6 files changed, 137 insertions, 0 deletions
diff --git a/x11-drivers/nvidia-drivers/files/nvidia-drivers-173-3.13.patch b/x11-drivers/nvidia-drivers/files/nvidia-drivers-173-3.13.patch new file mode 100644 index 00000000..ab3de168 --- /dev/null +++ b/x11-drivers/nvidia-drivers/files/nvidia-drivers-173-3.13.patch @@ -0,0 +1,13 @@ +--- a/usr/src/nv/nvacpi.c ++++ b/usr/src/nv/nvacpi.c +@@ -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); diff --git a/x11-drivers/nvidia-drivers/files/nvidia-drivers-173-3.14.patch b/x11-drivers/nvidia-drivers/files/nvidia-drivers-173-3.14.patch new file mode 100644 index 00000000..47bb70bc --- /dev/null +++ b/x11-drivers/nvidia-drivers/files/nvidia-drivers-173-3.14.patch @@ -0,0 +1,12 @@ +--- a/usr/src/nv/nv-linux.h ++++ b/usr/src/nv/nv-linux.h +@@ -206,8 +206,7 @@ extern int nv_pat_mode; + #endif + + #if defined(CONFIG_ACPI) +-#include <acpi/acpi.h> +-#include <acpi/acpi_drivers.h> ++#include <linux/acpi.h> + #if defined(NV_ACPI_DEVICE_OPS_HAS_MATCH) || defined(ACPI_VIDEO_HID) + #define NV_LINUX_ACPI_EVENTS_SUPPORTED 1 + #endif diff --git a/x11-drivers/nvidia-drivers/files/nvidia-drivers-3.13.patch b/x11-drivers/nvidia-drivers/files/nvidia-drivers-3.13.patch new file mode 100644 index 00000000..69c1ef85 --- /dev/null +++ b/x11-drivers/nvidia-drivers/files/nvidia-drivers-3.13.patch @@ -0,0 +1,35 @@ +--- a/kernel/nv-acpi.c ++++ b/kernel/nv-acpi.c +@@ -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)) diff --git a/x11-drivers/nvidia-drivers/files/nvidia-drivers-3.14.patch b/x11-drivers/nvidia-drivers/files/nvidia-drivers-3.14.patch new file mode 100644 index 00000000..48df3cba --- /dev/null +++ b/x11-drivers/nvidia-drivers/files/nvidia-drivers-3.14.patch @@ -0,0 +1,12 @@ +--- a/kernel/nv-linux.h ++++ b/kernel/nv-linux.h +@@ -273,8 +273,7 @@ + #endif + + #if !defined(NV_VMWARE) && defined(CONFIG_ACPI) +-#include <acpi/acpi.h> +-#include <acpi/acpi_drivers.h> ++#include <linux/acpi.h> + #if defined(NV_ACPI_DEVICE_OPS_HAS_MATCH) || defined(ACPI_VIDEO_HID) + #define NV_LINUX_ACPI_EVENTS_SUPPORTED 1 + #endif diff --git a/x11-drivers/nvidia-drivers/files/nvidia-drivers-304-3.13.patch b/x11-drivers/nvidia-drivers/files/nvidia-drivers-304-3.13.patch new file mode 100644 index 00000000..90b10036 --- /dev/null +++ b/x11-drivers/nvidia-drivers/files/nvidia-drivers-304-3.13.patch @@ -0,0 +1,13 @@ +--- a/kernel/nv-acpi.c ++++ b/kernel/nv-acpi.c +@@ -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); diff --git a/x11-drivers/nvidia-drivers/files/nvidia-drivers-331.13-pax-usercopy.patch b/x11-drivers/nvidia-drivers/files/nvidia-drivers-331.13-pax-usercopy.patch new file mode 100644 index 00000000..9777ce6c --- /dev/null +++ b/x11-drivers/nvidia-drivers/files/nvidia-drivers-331.13-pax-usercopy.patch @@ -0,0 +1,52 @@ +--- a/kernel/nv-linux.h ++++ b/kernel/nv-linux.h +@@ -757,16 +757,16 @@ + + #if defined(NV_KMEM_CACHE_CREATE_PRESENT) + #if (NV_KMEM_CACHE_CREATE_ARGUMENT_COUNT == 6) +-#define NV_KMEM_CACHE_CREATE(kmem_cache, name, type) \ ++#define NV_KMEM_CACHE_CREATE(kmem_cache, name, type, flags) \ + { \ + kmem_cache = kmem_cache_create(name, sizeof(type), \ +- 0, 0, NULL, NULL); \ ++ 0, flags, NULL, NULL); \ + } + #elif (NV_KMEM_CACHE_CREATE_ARGUMENT_COUNT == 5) +-#define NV_KMEM_CACHE_CREATE(kmem_cache, name, type) \ ++#define NV_KMEM_CACHE_CREATE(kmem_cache, name, type, flags) \ + { \ + kmem_cache = kmem_cache_create(name, sizeof(type), \ +- 0, 0, NULL); \ ++ 0, flags, NULL); \ + } + #else + #error "NV_KMEM_CACHE_CREATE_ARGUMENT_COUNT value unrecognized!" +--- a/kernel/nv.c ++++ b/kernel/nv.c +@@ -794,7 +794,7 @@ + NV_SPIN_LOCK_INIT(&km_lock); + #endif + +- NV_KMEM_CACHE_CREATE(nv_stack_t_cache, NV_STACK_CACHE_STR, nv_stack_t); ++ NV_KMEM_CACHE_CREATE(nv_stack_t_cache, NV_STACK_CACHE_STR, nv_stack_t, SLAB_USERCOPY); + if (nv_stack_t_cache == NULL) + { + nv_printf(NV_DBG_ERRORS, "NVRM: stack cache allocation failed!\n"); +@@ -924,7 +924,7 @@ + nv->os_state = (void *) &nv_ctl_device; + nv_lock_init_locks(nv); + +- NV_KMEM_CACHE_CREATE(nv_pte_t_cache, NV_PTE_CACHE_STR, nv_pte_t); ++ NV_KMEM_CACHE_CREATE(nv_pte_t_cache, NV_PTE_CACHE_STR, nv_pte_t, 0); + if (nv_pte_t_cache == NULL) + { + rc = -ENOMEM; +@@ -935,7 +935,7 @@ + if (NV_BUILD_MODULE_INSTANCES == 0) + { + NV_KMEM_CACHE_CREATE(nvidia_p2p_page_t_cache, "nvidia_p2p_page_t", +- nvidia_p2p_page_t); ++ nvidia_p2p_page_t, 0); + if (nvidia_p2p_page_t_cache == NULL) + { + rc = -ENOMEM; |