diff options
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/kmem.h | 16 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/kmem_linux.h | 2 |
2 files changed, 11 insertions, 7 deletions
diff --git a/drivers/gpu/nvgpu/include/nvgpu/kmem.h b/drivers/gpu/nvgpu/include/nvgpu/kmem.h index 59192525..3159da8b 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/kmem.h +++ b/drivers/gpu/nvgpu/include/nvgpu/kmem.h | |||
@@ -26,6 +26,16 @@ | |||
26 | 26 | ||
27 | struct gk20a; | 27 | struct gk20a; |
28 | 28 | ||
29 | /* | ||
30 | * When there's other implementations make sure they are included instead of | ||
31 | * Linux when not compiling on Linux! | ||
32 | * | ||
33 | * Also note this is above any usage of size_t. At the moment we don't have a | ||
34 | * cross OS way of defining the necessary types used by these APIs. Eventually | ||
35 | * we will need a <nvgpu/types.h> include to handle this. | ||
36 | */ | ||
37 | #include <nvgpu/kmem_linux.h> | ||
38 | |||
29 | /** | 39 | /** |
30 | * DOC: Kmem cache support | 40 | * DOC: Kmem cache support |
31 | * | 41 | * |
@@ -214,12 +224,6 @@ void nvgpu_kmem_fini(struct gk20a *g, int flags); | |||
214 | #define NVGPU_KMEM_FINI_WARN (1 << 2) | 224 | #define NVGPU_KMEM_FINI_WARN (1 << 2) |
215 | #define NVGPU_KMEM_FINI_BUG (1 << 3) | 225 | #define NVGPU_KMEM_FINI_BUG (1 << 3) |
216 | 226 | ||
217 | /* | ||
218 | * When there's other implementations make sure they are included instead of | ||
219 | * Linux when not compiling on Linux! | ||
220 | */ | ||
221 | #include <nvgpu/kmem_linux.h> | ||
222 | |||
223 | static inline void *__nvgpu_big_alloc(struct gk20a *g, size_t size, bool clear) | 227 | static inline void *__nvgpu_big_alloc(struct gk20a *g, size_t size, bool clear) |
224 | { | 228 | { |
225 | void *p; | 229 | void *p; |
diff --git a/drivers/gpu/nvgpu/include/nvgpu/kmem_linux.h b/drivers/gpu/nvgpu/include/nvgpu/kmem_linux.h index d1cd27f3..dbafc0ce 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/kmem_linux.h +++ b/drivers/gpu/nvgpu/include/nvgpu/kmem_linux.h | |||
@@ -52,7 +52,7 @@ static inline void nvgpu_kmem_debugfs_init(struct device *dev) | |||
52 | * nvgpu. This should not be included directly - instead include <nvgpu/kmem.h>. | 52 | * nvgpu. This should not be included directly - instead include <nvgpu/kmem.h>. |
53 | */ | 53 | */ |
54 | 54 | ||
55 | static inline void *__nvgpu_kmalloc(struct gk20a *g, unsigned long size, | 55 | static inline void *__nvgpu_kmalloc(struct gk20a *g, size_t size, |
56 | unsigned long ip) | 56 | unsigned long ip) |
57 | { | 57 | { |
58 | #ifdef CONFIG_NVGPU_TRACK_MEM_USAGE | 58 | #ifdef CONFIG_NVGPU_TRACK_MEM_USAGE |