diff --git a/drivers/gpu/nvgpu/include/nvgpu/kmem.h b/drivers/gpu/nvgpu/include/nvgpu/kmem.h index 591925252..3159da8b0 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/kmem.h +++ b/drivers/gpu/nvgpu/include/nvgpu/kmem.h @@ -26,6 +26,16 @@ struct gk20a; +/* + * When there's other implementations make sure they are included instead of + * Linux when not compiling on Linux! + * + * Also note this is above any usage of size_t. At the moment we don't have a + * cross OS way of defining the necessary types used by these APIs. Eventually + * we will need a include to handle this. + */ +#include + /** * DOC: Kmem cache support * @@ -214,12 +224,6 @@ void nvgpu_kmem_fini(struct gk20a *g, int flags); #define NVGPU_KMEM_FINI_WARN (1 << 2) #define NVGPU_KMEM_FINI_BUG (1 << 3) -/* - * When there's other implementations make sure they are included instead of - * Linux when not compiling on Linux! - */ -#include - static inline void *__nvgpu_big_alloc(struct gk20a *g, size_t size, bool clear) { void *p; diff --git a/drivers/gpu/nvgpu/include/nvgpu/kmem_linux.h b/drivers/gpu/nvgpu/include/nvgpu/kmem_linux.h index d1cd27f31..dbafc0ce0 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) * nvgpu. This should not be included directly - instead include . */ -static inline void *__nvgpu_kmalloc(struct gk20a *g, unsigned long size, +static inline void *__nvgpu_kmalloc(struct gk20a *g, size_t size, unsigned long ip) { #ifdef CONFIG_NVGPU_TRACK_MEM_USAGE