diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/nvgpu/common/posix/kmem.c | 14 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/kmem.h | 19 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/linux/kmem.h | 23 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/posix/kmem.h | 10 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/timers.h | 5 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/utils.h | 6 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/os/linux/kmem.c | 24 |
7 files changed, 50 insertions, 51 deletions
diff --git a/drivers/gpu/nvgpu/common/posix/kmem.c b/drivers/gpu/nvgpu/common/posix/kmem.c index 3c0b9b66..5fe0aeb2 100644 --- a/drivers/gpu/nvgpu/common/posix/kmem.c +++ b/drivers/gpu/nvgpu/common/posix/kmem.c | |||
@@ -64,17 +64,17 @@ void nvgpu_kmem_cache_free(struct nvgpu_kmem_cache *cache, void *ptr) | |||
64 | free(ptr); | 64 | free(ptr); |
65 | } | 65 | } |
66 | 66 | ||
67 | void *__nvgpu_kmalloc(struct gk20a *g, size_t size, unsigned long ip) | 67 | void *__nvgpu_kmalloc(struct gk20a *g, size_t size, void *ip) |
68 | { | 68 | { |
69 | return malloc(size); | 69 | return malloc(size); |
70 | } | 70 | } |
71 | 71 | ||
72 | void *__nvgpu_kzalloc(struct gk20a *g, size_t size, unsigned long ip) | 72 | void *__nvgpu_kzalloc(struct gk20a *g, size_t size, void *ip) |
73 | { | 73 | { |
74 | return calloc(1, size); | 74 | return calloc(1, size); |
75 | } | 75 | } |
76 | 76 | ||
77 | void *__nvgpu_kcalloc(struct gk20a *g, size_t n, size_t size, unsigned long ip) | 77 | void *__nvgpu_kcalloc(struct gk20a *g, size_t n, size_t size, void *ip) |
78 | { | 78 | { |
79 | /* | 79 | /* |
80 | * calloc() implicitly zeros mem. So calloc a single member size bytes | 80 | * calloc() implicitly zeros mem. So calloc a single member size bytes |
@@ -91,12 +91,12 @@ void __nvgpu_kfree(struct gk20a *g, void *addr) | |||
91 | /* | 91 | /* |
92 | * The concept of vmalloc() does not exist in userspace. | 92 | * The concept of vmalloc() does not exist in userspace. |
93 | */ | 93 | */ |
94 | void *__nvgpu_vmalloc(struct gk20a *g, unsigned long size, unsigned long ip) | 94 | void *__nvgpu_vmalloc(struct gk20a *g, unsigned long size, void *ip) |
95 | { | 95 | { |
96 | return __nvgpu_kmalloc(g, size, ip); | 96 | return __nvgpu_kmalloc(g, size, ip); |
97 | } | 97 | } |
98 | 98 | ||
99 | void *__nvgpu_vzalloc(struct gk20a *g, unsigned long size, unsigned long ip) | 99 | void *__nvgpu_vzalloc(struct gk20a *g, unsigned long size, void *ip) |
100 | { | 100 | { |
101 | return __nvgpu_kzalloc(g, size, ip); | 101 | return __nvgpu_kzalloc(g, size, ip); |
102 | } | 102 | } |
@@ -113,8 +113,8 @@ void *__nvgpu_big_alloc(struct gk20a *g, size_t size, bool clear) | |||
113 | * reuse k[zm]alloc() for this. | 113 | * reuse k[zm]alloc() for this. |
114 | */ | 114 | */ |
115 | return clear ? | 115 | return clear ? |
116 | __nvgpu_kzalloc(g, size, _THIS_IP_) : | 116 | __nvgpu_kzalloc(g, size, _NVGPU_GET_IP_) : |
117 | __nvgpu_kmalloc(g, size, _THIS_IP_); | 117 | __nvgpu_kmalloc(g, size, _NVGPU_GET_IP_); |
118 | } | 118 | } |
119 | 119 | ||
120 | void nvgpu_big_free(struct gk20a *g, void *p) | 120 | void nvgpu_big_free(struct gk20a *g, void *p) |
diff --git a/drivers/gpu/nvgpu/include/nvgpu/kmem.h b/drivers/gpu/nvgpu/include/nvgpu/kmem.h index 91574ce0..852f6f8a 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/kmem.h +++ b/drivers/gpu/nvgpu/include/nvgpu/kmem.h | |||
@@ -24,13 +24,7 @@ | |||
24 | #define __NVGPU_KMEM_H__ | 24 | #define __NVGPU_KMEM_H__ |
25 | 25 | ||
26 | #include <nvgpu/types.h> | 26 | #include <nvgpu/types.h> |
27 | 27 | #include <nvgpu/utils.h> | |
28 | /* | ||
29 | * Incase this isn't defined already. | ||
30 | */ | ||
31 | #ifndef _THIS_IP_ | ||
32 | #define _THIS_IP_ ({ __label__ __here; __here: (unsigned long)&&__here; }) | ||
33 | #endif | ||
34 | 28 | ||
35 | struct gk20a; | 29 | struct gk20a; |
36 | 30 | ||
@@ -125,7 +119,7 @@ void nvgpu_kmem_cache_free(struct nvgpu_kmem_cache *cache, void *ptr); | |||
125 | * | 119 | * |
126 | * This function may sleep so cannot be used in IRQs. | 120 | * This function may sleep so cannot be used in IRQs. |
127 | */ | 121 | */ |
128 | #define nvgpu_kmalloc(g, size) __nvgpu_kmalloc(g, size, _THIS_IP_) | 122 | #define nvgpu_kmalloc(g, size) __nvgpu_kmalloc(g, size, _NVGPU_GET_IP_) |
129 | 123 | ||
130 | /** | 124 | /** |
131 | * nvgpu_kzalloc - Allocate from the kernel's allocator. | 125 | * nvgpu_kzalloc - Allocate from the kernel's allocator. |
@@ -136,7 +130,7 @@ void nvgpu_kmem_cache_free(struct nvgpu_kmem_cache *cache, void *ptr); | |||
136 | * Identical to nvgpu_kalloc() except the memory will be zeroed before being | 130 | * Identical to nvgpu_kalloc() except the memory will be zeroed before being |
137 | * returned. | 131 | * returned. |
138 | */ | 132 | */ |
139 | #define nvgpu_kzalloc(g, size) __nvgpu_kzalloc(g, size, _THIS_IP_) | 133 | #define nvgpu_kzalloc(g, size) __nvgpu_kzalloc(g, size, _NVGPU_GET_IP_) |
140 | 134 | ||
141 | /** | 135 | /** |
142 | * nvgpu_kcalloc - Allocate from the kernel's allocator. | 136 | * nvgpu_kcalloc - Allocate from the kernel's allocator. |
@@ -148,7 +142,8 @@ void nvgpu_kmem_cache_free(struct nvgpu_kmem_cache *cache, void *ptr); | |||
148 | * Identical to nvgpu_kalloc() except the size of the memory chunk returned is | 142 | * Identical to nvgpu_kalloc() except the size of the memory chunk returned is |
149 | * @n * @size. | 143 | * @n * @size. |
150 | */ | 144 | */ |
151 | #define nvgpu_kcalloc(g, n, size) __nvgpu_kcalloc(g, n, size, _THIS_IP_) | 145 | #define nvgpu_kcalloc(g, n, size) \ |
146 | __nvgpu_kcalloc(g, n, size, _NVGPU_GET_IP_) | ||
152 | 147 | ||
153 | /** | 148 | /** |
154 | * nvgpu_vmalloc - Allocate memory and return a map to it. | 149 | * nvgpu_vmalloc - Allocate memory and return a map to it. |
@@ -164,7 +159,7 @@ void nvgpu_kmem_cache_free(struct nvgpu_kmem_cache *cache, void *ptr); | |||
164 | * | 159 | * |
165 | * This function may sleep. | 160 | * This function may sleep. |
166 | */ | 161 | */ |
167 | #define nvgpu_vmalloc(g, size) __nvgpu_vmalloc(g, size, _THIS_IP_) | 162 | #define nvgpu_vmalloc(g, size) __nvgpu_vmalloc(g, size, _NVGPU_GET_IP_) |
168 | 163 | ||
169 | /** | 164 | /** |
170 | * nvgpu_vzalloc - Allocate memory and return a map to it. | 165 | * nvgpu_vzalloc - Allocate memory and return a map to it. |
@@ -174,7 +169,7 @@ void nvgpu_kmem_cache_free(struct nvgpu_kmem_cache *cache, void *ptr); | |||
174 | * | 169 | * |
175 | * Identical to nvgpu_vmalloc() except this will return zero'ed memory. | 170 | * Identical to nvgpu_vmalloc() except this will return zero'ed memory. |
176 | */ | 171 | */ |
177 | #define nvgpu_vzalloc(g, size) __nvgpu_vzalloc(g, size, _THIS_IP_) | 172 | #define nvgpu_vzalloc(g, size) __nvgpu_vzalloc(g, size, _NVGPU_GET_IP_) |
178 | 173 | ||
179 | /** | 174 | /** |
180 | * nvgpu_kfree - Frees an alloc from nvgpu_kmalloc, nvgpu_kzalloc, | 175 | * nvgpu_kfree - Frees an alloc from nvgpu_kmalloc, nvgpu_kzalloc, |
diff --git a/drivers/gpu/nvgpu/include/nvgpu/linux/kmem.h b/drivers/gpu/nvgpu/include/nvgpu/linux/kmem.h index 611854f2..660aac9f 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/linux/kmem.h +++ b/drivers/gpu/nvgpu/include/nvgpu/linux/kmem.h | |||
@@ -21,14 +21,11 @@ struct gk20a; | |||
21 | struct device; | 21 | struct device; |
22 | 22 | ||
23 | #ifdef CONFIG_NVGPU_TRACK_MEM_USAGE | 23 | #ifdef CONFIG_NVGPU_TRACK_MEM_USAGE |
24 | void *__nvgpu_track_vmalloc(struct gk20a *g, unsigned long size, | 24 | void *__nvgpu_track_vmalloc(struct gk20a *g, unsigned long size, void *ip); |
25 | unsigned long ip); | 25 | void *__nvgpu_track_vzalloc(struct gk20a *g, unsigned long size, void *ip); |
26 | void *__nvgpu_track_vzalloc(struct gk20a *g, unsigned long size, | 26 | void *__nvgpu_track_kmalloc(struct gk20a *g, size_t size, void *ip); |
27 | unsigned long ip); | 27 | void *__nvgpu_track_kzalloc(struct gk20a *g, size_t size, void *ip); |
28 | void *__nvgpu_track_kmalloc(struct gk20a *g, size_t size, unsigned long ip); | 28 | void *__nvgpu_track_kcalloc(struct gk20a *g, size_t n, size_t size, void *ip); |
29 | void *__nvgpu_track_kzalloc(struct gk20a *g, size_t size, unsigned long ip); | ||
30 | void *__nvgpu_track_kcalloc(struct gk20a *g, size_t n, size_t size, | ||
31 | unsigned long ip); | ||
32 | void __nvgpu_track_vfree(struct gk20a *g, void *addr); | 29 | void __nvgpu_track_vfree(struct gk20a *g, void *addr); |
33 | void __nvgpu_track_kfree(struct gk20a *g, void *addr); | 30 | void __nvgpu_track_kfree(struct gk20a *g, void *addr); |
34 | #endif | 31 | #endif |
@@ -39,11 +36,11 @@ void __nvgpu_track_kfree(struct gk20a *g, void *addr); | |||
39 | * These are the Linux implementations of the various kmem functions defined by | 36 | * These are the Linux implementations of the various kmem functions defined by |
40 | * nvgpu. This should not be included directly - instead include <nvgpu/kmem.h>. | 37 | * nvgpu. This should not be included directly - instead include <nvgpu/kmem.h>. |
41 | */ | 38 | */ |
42 | void *__nvgpu_kmalloc(struct gk20a *g, size_t size, unsigned long ip); | 39 | void *__nvgpu_kmalloc(struct gk20a *g, size_t size, void *ip); |
43 | void *__nvgpu_kzalloc(struct gk20a *g, size_t size, unsigned long ip); | 40 | void *__nvgpu_kzalloc(struct gk20a *g, size_t size, void *ip); |
44 | void *__nvgpu_kcalloc(struct gk20a *g, size_t n, size_t size, unsigned long ip); | 41 | void *__nvgpu_kcalloc(struct gk20a *g, size_t n, size_t size, void *ip); |
45 | void *__nvgpu_vmalloc(struct gk20a *g, unsigned long size, unsigned long ip); | 42 | void *__nvgpu_vmalloc(struct gk20a *g, unsigned long size, void *ip); |
46 | void *__nvgpu_vzalloc(struct gk20a *g, unsigned long size, unsigned long ip); | 43 | void *__nvgpu_vzalloc(struct gk20a *g, unsigned long size, void *ip); |
47 | void __nvgpu_kfree(struct gk20a *g, void *addr); | 44 | void __nvgpu_kfree(struct gk20a *g, void *addr); |
48 | void __nvgpu_vfree(struct gk20a *g, void *addr); | 45 | void __nvgpu_vfree(struct gk20a *g, void *addr); |
49 | 46 | ||
diff --git a/drivers/gpu/nvgpu/include/nvgpu/posix/kmem.h b/drivers/gpu/nvgpu/include/nvgpu/posix/kmem.h index 483ac3b3..efcdd3d5 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/posix/kmem.h +++ b/drivers/gpu/nvgpu/include/nvgpu/posix/kmem.h | |||
@@ -25,11 +25,11 @@ | |||
25 | 25 | ||
26 | #include <nvgpu/types.h> | 26 | #include <nvgpu/types.h> |
27 | 27 | ||
28 | void *__nvgpu_kmalloc(struct gk20a *g, size_t size, unsigned long ip); | 28 | void *__nvgpu_kmalloc(struct gk20a *g, size_t size, void *ip); |
29 | void *__nvgpu_kzalloc(struct gk20a *g, size_t size, unsigned long ip); | 29 | void *__nvgpu_kzalloc(struct gk20a *g, size_t size, void *ip); |
30 | void *__nvgpu_kcalloc(struct gk20a *g, size_t n, size_t size, unsigned long ip); | 30 | void *__nvgpu_kcalloc(struct gk20a *g, size_t n, size_t size, void *ip); |
31 | void *__nvgpu_vmalloc(struct gk20a *g, unsigned long size, unsigned long ip); | 31 | void *__nvgpu_vmalloc(struct gk20a *g, unsigned long size, void *ip); |
32 | void *__nvgpu_vzalloc(struct gk20a *g, unsigned long size, unsigned long ip); | 32 | void *__nvgpu_vzalloc(struct gk20a *g, unsigned long size, void *ip); |
33 | void __nvgpu_kfree(struct gk20a *g, void *addr); | 33 | void __nvgpu_kfree(struct gk20a *g, void *addr); |
34 | void __nvgpu_vfree(struct gk20a *g, void *addr); | 34 | void __nvgpu_vfree(struct gk20a *g, void *addr); |
35 | 35 | ||
diff --git a/drivers/gpu/nvgpu/include/nvgpu/timers.h b/drivers/gpu/nvgpu/include/nvgpu/timers.h index 83dd8d78..20becfdd 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/timers.h +++ b/drivers/gpu/nvgpu/include/nvgpu/timers.h | |||
@@ -24,6 +24,7 @@ | |||
24 | #define __NVGPU_TIMERS_H__ | 24 | #define __NVGPU_TIMERS_H__ |
25 | 25 | ||
26 | #include <nvgpu/types.h> | 26 | #include <nvgpu/types.h> |
27 | #include <nvgpu/utils.h> | ||
27 | 28 | ||
28 | struct gk20a; | 29 | struct gk20a; |
29 | 30 | ||
@@ -85,10 +86,10 @@ int nvgpu_timeout_init(struct gk20a *g, struct nvgpu_timeout *timeout, | |||
85 | int nvgpu_timeout_peek_expired(struct nvgpu_timeout *timeout); | 86 | int nvgpu_timeout_peek_expired(struct nvgpu_timeout *timeout); |
86 | 87 | ||
87 | #define nvgpu_timeout_expired(__timeout) \ | 88 | #define nvgpu_timeout_expired(__timeout) \ |
88 | __nvgpu_timeout_expired_msg(__timeout, (void *)_THIS_IP_, "") | 89 | __nvgpu_timeout_expired_msg(__timeout, _NVGPU_GET_IP_, "") |
89 | 90 | ||
90 | #define nvgpu_timeout_expired_msg(__timeout, fmt, args...) \ | 91 | #define nvgpu_timeout_expired_msg(__timeout, fmt, args...) \ |
91 | __nvgpu_timeout_expired_msg(__timeout, (void *)_THIS_IP_, \ | 92 | __nvgpu_timeout_expired_msg(__timeout, _NVGPU_GET_IP_, \ |
92 | fmt, ##args) | 93 | fmt, ##args) |
93 | 94 | ||
94 | /* | 95 | /* |
diff --git a/drivers/gpu/nvgpu/include/nvgpu/utils.h b/drivers/gpu/nvgpu/include/nvgpu/utils.h index 22102fa3..6184608a 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/utils.h +++ b/drivers/gpu/nvgpu/include/nvgpu/utils.h | |||
@@ -49,4 +49,10 @@ static inline u32 get_field(u32 reg, u32 mask) | |||
49 | { | 49 | { |
50 | return (reg & mask); | 50 | return (reg & mask); |
51 | } | 51 | } |
52 | |||
53 | /* | ||
54 | * MISRA Rule 11.6 compliant IP address generator. | ||
55 | */ | ||
56 | #define _NVGPU_GET_IP_ ({ __label__ __here; __here: &&__here; }) | ||
57 | |||
52 | #endif /* NVGPU_UTILS_H */ | 58 | #endif /* NVGPU_UTILS_H */ |
diff --git a/drivers/gpu/nvgpu/os/linux/kmem.c b/drivers/gpu/nvgpu/os/linux/kmem.c index 10946a08..86572bcc 100644 --- a/drivers/gpu/nvgpu/os/linux/kmem.c +++ b/drivers/gpu/nvgpu/os/linux/kmem.c | |||
@@ -69,7 +69,7 @@ void nvgpu_big_free(struct gk20a *g, void *p) | |||
69 | nvgpu_kfree(g, p); | 69 | nvgpu_kfree(g, p); |
70 | } | 70 | } |
71 | 71 | ||
72 | void *__nvgpu_kmalloc(struct gk20a *g, size_t size, unsigned long ip) | 72 | void *__nvgpu_kmalloc(struct gk20a *g, size_t size, void *ip) |
73 | { | 73 | { |
74 | void *alloc; | 74 | void *alloc; |
75 | 75 | ||
@@ -85,7 +85,7 @@ void *__nvgpu_kmalloc(struct gk20a *g, size_t size, unsigned long ip) | |||
85 | return alloc; | 85 | return alloc; |
86 | } | 86 | } |
87 | 87 | ||
88 | void *__nvgpu_kzalloc(struct gk20a *g, size_t size, unsigned long ip) | 88 | void *__nvgpu_kzalloc(struct gk20a *g, size_t size, void *ip) |
89 | { | 89 | { |
90 | void *alloc; | 90 | void *alloc; |
91 | 91 | ||
@@ -101,7 +101,7 @@ void *__nvgpu_kzalloc(struct gk20a *g, size_t size, unsigned long ip) | |||
101 | return alloc; | 101 | return alloc; |
102 | } | 102 | } |
103 | 103 | ||
104 | void *__nvgpu_kcalloc(struct gk20a *g, size_t n, size_t size, unsigned long ip) | 104 | void *__nvgpu_kcalloc(struct gk20a *g, size_t n, size_t size, void *ip) |
105 | { | 105 | { |
106 | void *alloc; | 106 | void *alloc; |
107 | 107 | ||
@@ -117,7 +117,7 @@ void *__nvgpu_kcalloc(struct gk20a *g, size_t n, size_t size, unsigned long ip) | |||
117 | return alloc; | 117 | return alloc; |
118 | } | 118 | } |
119 | 119 | ||
120 | void *__nvgpu_vmalloc(struct gk20a *g, unsigned long size, unsigned long ip) | 120 | void *__nvgpu_vmalloc(struct gk20a *g, unsigned long size, void *ip) |
121 | { | 121 | { |
122 | void *alloc; | 122 | void *alloc; |
123 | 123 | ||
@@ -132,7 +132,7 @@ void *__nvgpu_vmalloc(struct gk20a *g, unsigned long size, unsigned long ip) | |||
132 | return alloc; | 132 | return alloc; |
133 | } | 133 | } |
134 | 134 | ||
135 | void *__nvgpu_vzalloc(struct gk20a *g, unsigned long size, unsigned long ip) | 135 | void *__nvgpu_vzalloc(struct gk20a *g, unsigned long size, void *ip) |
136 | { | 136 | { |
137 | void *alloc; | 137 | void *alloc; |
138 | 138 | ||
@@ -228,7 +228,7 @@ static struct nvgpu_mem_alloc *nvgpu_rem_alloc( | |||
228 | 228 | ||
229 | static int __nvgpu_save_kmem_alloc(struct nvgpu_mem_alloc_tracker *tracker, | 229 | static int __nvgpu_save_kmem_alloc(struct nvgpu_mem_alloc_tracker *tracker, |
230 | unsigned long size, unsigned long real_size, | 230 | unsigned long size, unsigned long real_size, |
231 | u64 addr, unsigned long ip) | 231 | u64 addr, void *ip) |
232 | { | 232 | { |
233 | int ret; | 233 | int ret; |
234 | struct nvgpu_mem_alloc *alloc; | 234 | struct nvgpu_mem_alloc *alloc; |
@@ -244,7 +244,7 @@ static int __nvgpu_save_kmem_alloc(struct nvgpu_mem_alloc_tracker *tracker, | |||
244 | alloc->size = size; | 244 | alloc->size = size; |
245 | alloc->real_size = real_size; | 245 | alloc->real_size = real_size; |
246 | alloc->addr = addr; | 246 | alloc->addr = addr; |
247 | alloc->ip = (void *)(uintptr_t)ip; | 247 | alloc->ip = ip; |
248 | 248 | ||
249 | #ifdef __NVGPU_SAVE_KALLOC_STACK_TRACES | 249 | #ifdef __NVGPU_SAVE_KALLOC_STACK_TRACES |
250 | stack_trace.max_entries = MAX_STACK_TRACE; | 250 | stack_trace.max_entries = MAX_STACK_TRACE; |
@@ -322,7 +322,7 @@ static void __nvgpu_check_kalloc_size(size_t size) | |||
322 | } | 322 | } |
323 | 323 | ||
324 | void *__nvgpu_track_vmalloc(struct gk20a *g, unsigned long size, | 324 | void *__nvgpu_track_vmalloc(struct gk20a *g, unsigned long size, |
325 | unsigned long ip) | 325 | void *ip) |
326 | { | 326 | { |
327 | void *alloc = vmalloc(size); | 327 | void *alloc = vmalloc(size); |
328 | 328 | ||
@@ -342,7 +342,7 @@ void *__nvgpu_track_vmalloc(struct gk20a *g, unsigned long size, | |||
342 | } | 342 | } |
343 | 343 | ||
344 | void *__nvgpu_track_vzalloc(struct gk20a *g, unsigned long size, | 344 | void *__nvgpu_track_vzalloc(struct gk20a *g, unsigned long size, |
345 | unsigned long ip) | 345 | void *ip) |
346 | { | 346 | { |
347 | void *alloc = vzalloc(size); | 347 | void *alloc = vzalloc(size); |
348 | 348 | ||
@@ -361,7 +361,7 @@ void *__nvgpu_track_vzalloc(struct gk20a *g, unsigned long size, | |||
361 | return alloc; | 361 | return alloc; |
362 | } | 362 | } |
363 | 363 | ||
364 | void *__nvgpu_track_kmalloc(struct gk20a *g, size_t size, unsigned long ip) | 364 | void *__nvgpu_track_kmalloc(struct gk20a *g, size_t size, void *ip) |
365 | { | 365 | { |
366 | void *alloc = kmalloc(size, GFP_KERNEL); | 366 | void *alloc = kmalloc(size, GFP_KERNEL); |
367 | 367 | ||
@@ -376,7 +376,7 @@ void *__nvgpu_track_kmalloc(struct gk20a *g, size_t size, unsigned long ip) | |||
376 | return alloc; | 376 | return alloc; |
377 | } | 377 | } |
378 | 378 | ||
379 | void *__nvgpu_track_kzalloc(struct gk20a *g, size_t size, unsigned long ip) | 379 | void *__nvgpu_track_kzalloc(struct gk20a *g, size_t size, void *ip) |
380 | { | 380 | { |
381 | void *alloc = kzalloc(size, GFP_KERNEL); | 381 | void *alloc = kzalloc(size, GFP_KERNEL); |
382 | 382 | ||
@@ -392,7 +392,7 @@ void *__nvgpu_track_kzalloc(struct gk20a *g, size_t size, unsigned long ip) | |||
392 | } | 392 | } |
393 | 393 | ||
394 | void *__nvgpu_track_kcalloc(struct gk20a *g, size_t n, size_t size, | 394 | void *__nvgpu_track_kcalloc(struct gk20a *g, size_t n, size_t size, |
395 | unsigned long ip) | 395 | void *ip) |
396 | { | 396 | { |
397 | void *alloc = kcalloc(n, size, GFP_KERNEL); | 397 | void *alloc = kcalloc(n, size, GFP_KERNEL); |
398 | 398 | ||