summaryrefslogtreecommitdiff
path: root/x11-drivers/nvidia-drivers/files
diff options
context:
space:
mode:
authorBlackNoxis <steven.darklight@gmail.com>2015-01-28 14:41:47 +0200
committerBlackNoxis <steven.darklight@gmail.com>2015-01-28 14:41:47 +0200
commit74f0c9049b66d38a7ac15d92293acb1bb4048f19 (patch)
treeb74cecf3e6916cf03797a5de42553394f9cda429 /x11-drivers/nvidia-drivers/files
parentd59931d3faae79b921e8277fbaa728b1ca551db3 (diff)
Added new nvidia drivers, changed old
Diffstat (limited to 'x11-drivers/nvidia-drivers/files')
-rw-r--r--x11-drivers/nvidia-drivers/files/nvidia-drivers-346.16-pax-constify.patch25
-rw-r--r--x11-drivers/nvidia-drivers/files/nvidia-drivers-346.16-pax-usercopy.patch47
2 files changed, 72 insertions, 0 deletions
diff --git a/x11-drivers/nvidia-drivers/files/nvidia-drivers-346.16-pax-constify.patch b/x11-drivers/nvidia-drivers/files/nvidia-drivers-346.16-pax-constify.patch
new file mode 100644
index 00000000..9b9f53e4
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/files/nvidia-drivers-346.16-pax-constify.patch
@@ -0,0 +1,25 @@
+--- a/kernel/uvm/uvm_common.c
++++ b/kernel/uvm/uvm_common.c
+@@ -95,7 +95,6 @@ static RM_STATUS uvmnext_gpu_event_stop_
+ #endif // NVIDIA_UVM_NEXT_ENABLED
+
+ static dev_t g_uvmBaseDev;
+-struct UvmOpsUvmEvents g_exportedUvmOps;
+
+ // TODO: This would be easier if RM allowed for multiple registrations, since we
+ // could register UVM-Lite and UVM-Next separately (bug 1372835).
+@@ -147,9 +146,11 @@ static RM_STATUS uvmSetupGpuProvider(voi
+ RM_STATUS status = RM_OK;
+
+ #ifdef NVIDIA_UVM_RM_ENABLED
+- g_exportedUvmOps.startDevice = uvm_gpu_event_start_device;
+- g_exportedUvmOps.stopDevice = uvm_gpu_event_stop_device;
+- g_exportedUvmOps.isrTopHalf = uvmnext_isr_top_half;
++ static struct UvmOpsUvmEvents g_exportedUvmOps = {
++ .startDevice = uvm_gpu_event_start_device,
++ .stopDevice = uvm_gpu_event_stop_device,
++ .isrTopHalf = uvmnext_isr_top_half,
++ };
+
+ // call RM to exchange the function pointers.
+ status = nvUvmInterfaceRegisterUvmCallbacks(&g_exportedUvmOps);
diff --git a/x11-drivers/nvidia-drivers/files/nvidia-drivers-346.16-pax-usercopy.patch b/x11-drivers/nvidia-drivers/files/nvidia-drivers-346.16-pax-usercopy.patch
new file mode 100644
index 00000000..d1a440c9
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/files/nvidia-drivers-346.16-pax-usercopy.patch
@@ -0,0 +1,47 @@
+--- a/kernel/nv.c
++++ b/kernel/nv.c
+@@ -705,7 +705,7 @@ int __init nvidia_init_module(void)
+ #endif
+
+ nvidia_stack_t_cache = NV_KMEM_CACHE_CREATE(nvidia_stack_cache_name,
+- nvidia_stack_t);
++ nvidia_stack_t, SLAB_USERCOPY);
+ if (nvidia_stack_t_cache == NULL)
+ {
+ nv_printf(NV_DBG_ERRORS, "NVRM: stack cache allocation failed!\n");
+@@ -846,7 +846,7 @@ int __init nvidia_init_module(void)
+ nv_lock_init_locks(nv);
+
+ nvidia_pte_t_cache = NV_KMEM_CACHE_CREATE(nvidia_pte_cache_name,
+- nvidia_pte_t);
++ nvidia_pte_t, 0);
+ if (nvidia_pte_t_cache == NULL)
+ {
+ rc = -ENOMEM;
+@@ -857,7 +857,7 @@ int __init nvidia_init_module(void)
+ if (!nv_multiple_kernel_modules)
+ {
+ nvidia_p2p_page_t_cache = NV_KMEM_CACHE_CREATE(nvidia_p2p_page_cache_name,
+- nvidia_p2p_page_t);
++ nvidia_p2p_page_t, 0);
+ if (nvidia_p2p_page_t_cache == NULL)
+ {
+ rc = -ENOMEM;
+--- a/kernel/nv-linux.h
++++ b/kernel/nv-linux.h
+@@ -1431,11 +1431,11 @@ extern void *nvidia_stack_t_cache;
+
+ #if !defined(NV_VMWARE)
+ #if (NV_KMEM_CACHE_CREATE_ARGUMENT_COUNT == 5)
+-#define NV_KMEM_CACHE_CREATE(name, type) \
+- kmem_cache_create(name, sizeof(type), 0, 0, NULL)
++#define NV_KMEM_CACHE_CREATE(name, type, flags) \
++ kmem_cache_create(name, sizeof(type), 0, flags, NULL)
+ #else
+-#define NV_KMEM_CACHE_CREATE(name, type) \
+- kmem_cache_create(name, sizeof(type), 0, 0, NULL, \
++#define NV_KMEM_CACHE_CREATE(name, type, flags) \
++ kmem_cache_create(name, sizeof(type), 0, flags, NULL, \
+ NULL)
+ #endif
+ #define NV_KMEM_CACHE_DESTROY(kmem_cache) \