gpu: nvgpu: update dma dbg to report caller

__dma_dbg() logs func and line details of itself. Update it
to report caller details.

Bug 1987855

Change-Id: I51913b0c57c12e11880699caed557da9491304cf
Signed-off-by: Nitin Kumbhar <nkumbhar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1771511
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Nitin Kumbhar
2018-07-05 16:52:19 +05:30
committed by mobile promotions
parent d7c78df466
commit 26b50d77f7

View File

@@ -97,7 +97,8 @@ static char *nvgpu_dma_flags_to_str(struct gk20a *g, unsigned long flags)
* Please use dma_dbg_alloc() and dma_dbg_free() instead of this function.
*/
static void __dma_dbg(struct gk20a *g, size_t size, unsigned long flags,
const char *type, const char *what)
const char *type, const char *what,
const char *func, int line)
{
char *flags_str = NULL;
@@ -111,7 +112,7 @@ static void __dma_dbg(struct gk20a *g, size_t size, unsigned long flags,
flags_str = nvgpu_dma_flags_to_str(g, flags);
__nvgpu_log_dbg(g, gpu_dbg_dma,
__func__, __LINE__,
func, line,
"DMA %s: [%s] size=%-7zu "
"aligned=%-7zu total=%-10llukB %s",
what, type,
@@ -124,9 +125,9 @@ static void __dma_dbg(struct gk20a *g, size_t size, unsigned long flags,
}
#define dma_dbg_alloc(g, size, flags, type) \
__dma_dbg(g, size, flags, type, "alloc")
__dma_dbg(g, size, flags, type, "alloc", __func__, __LINE__)
#define dma_dbg_free(g, size, flags, type) \
__dma_dbg(g, size, flags, type, "free")
__dma_dbg(g, size, flags, type, "free", __func__, __LINE__)
/*
* For after the DMA alloc is done.