From 3e841d6a37ceddaf8aa224b597ab4927155d226e Mon Sep 17 00:00:00 2001 From: Alex Waterman Date: Thu, 14 Sep 2017 13:43:24 -0700 Subject: gpu: nvgpu: Fix kmem debugging Make the kmem debugging prints much more easily usable. Previously the prints would only take effect if the full tracking was enabled: CONFIG_NVGPU_TRACK_MEM_USAGE However, there are many times when just the debug prints would be nice to have by simply setting the log mask bit in the log mask. echo 0x80000 > /sys/kernel/debug//log_mask Also this change now uses the real nvgpu_log() function instead of the legacy nvgpu_dbg() function. This makes the logging appear with proper GPU printing as well. Change-Id: If545da3d357d38fe8252e7d548c6765b995cd3d7 Signed-off-by: Alex Waterman Reviewed-on: https://git-master.nvidia.com/r/1560248 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: svc-mobile-coverity Reviewed-by: svccoveritychecker GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom --- drivers/gpu/nvgpu/include/nvgpu/kmem.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/gpu/nvgpu/include') diff --git a/drivers/gpu/nvgpu/include/nvgpu/kmem.h b/drivers/gpu/nvgpu/include/nvgpu/kmem.h index ff4b7820..db035060 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/kmem.h +++ b/drivers/gpu/nvgpu/include/nvgpu/kmem.h @@ -185,8 +185,8 @@ void nvgpu_kmem_cache_free(struct nvgpu_kmem_cache *cache, void *ptr); */ #define nvgpu_vfree(g, addr) __nvgpu_vfree(g, addr) -#define kmem_dbg(fmt, args...) \ - gk20a_dbg(gpu_dbg_kmem, fmt, ##args) +#define kmem_dbg(g, fmt, args...) \ + nvgpu_log(g, gpu_dbg_kmem, fmt, ##args) /** * nvgpu_kmem_init - Initialize the kmem tracking stuff. -- cgit v1.2.2