You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
48 lines
1.9 KiB
48 lines
1.9 KiB
10 years ago
|
--- 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) \
|