2011-10-11 01:56:35 +00:00
|
|
|
diff -u kernel/nv-linux.h kernel-orig/nv-linux.h
|
|
|
|
--- kernel-orig/nv-linux.h 2011-09-23 17:32:09.000000000 -0700
|
|
|
|
+++ kernel/nv-linux.h 2011-10-10 18:01:45.391793788 -0700
|
2011-09-29 02:05:42 +00:00
|
|
|
@@ -695,16 +695,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); \
|
2011-10-11 01:56:35 +00:00
|
|
|
+ 0, flags, NULL, NULL); \
|
2011-09-29 02:05:42 +00:00
|
|
|
}
|
|
|
|
#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, flags, NULL); \
|
2011-10-11 01:56:35 +00:00
|
|
|
- 0, 0, NULL); \
|
2011-09-29 02:05:42 +00:00
|
|
|
}
|
|
|
|
#else
|
|
|
|
#error "NV_KMEM_CACHE_CREATE_ARGUMENT_COUNT value unrecognized!"
|
2011-10-11 01:56:35 +00:00
|
|
|
diff -u kernel/nv.c kernel-orig/nv.c
|
|
|
|
--- kernel-orig/nv.c 2011-09-23 17:32:09.000000000 -0700
|
|
|
|
+++ kernel/nv.c 2011-10-10 18:49:39.331880626 -0700
|
|
|
|
@@ -1105,7 +1105,7 @@
|
2011-09-29 02:05:42 +00:00
|
|
|
NV_SPIN_LOCK_INIT(&km_lock);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
- NV_KMEM_CACHE_CREATE(nv_stack_t_cache, "nv_stack_t", nv_stack_t);
|
|
|
|
+ NV_KMEM_CACHE_CREATE(nv_stack_t_cache, "nv_stack_t", nv_stack_t, SLAB_USERCOPY);
|
|
|
|
if (nv_stack_t_cache == NULL)
|
|
|
|
{
|
|
|
|
nv_printf(NV_DBG_ERRORS, "NVRM: stack cache allocation failed!\n");
|
2011-10-11 01:56:35 +00:00
|
|
|
@@ -1220,7 +1220,7 @@
|
2011-09-29 02:05:42 +00:00
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
- NV_KMEM_CACHE_CREATE(nv_pte_t_cache, "nv_pte_t", nv_pte_t);
|
|
|
|
+ NV_KMEM_CACHE_CREATE(nv_pte_t_cache, "nv_pte_t", nv_pte_t, 0);
|
|
|
|
if (nv_pte_t_cache == NULL)
|
|
|
|
{
|
|
|
|
rc = -ENOMEM;
|
2011-10-11 01:56:35 +00:00
|
|
|
@@ -1229,7 +1229,7 @@
|
|
|
|
}
|
|
|
|
|
|
|
|
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;
|