From d98232ab21df04605cfc453528d12aab8af25b49 Mon Sep 17 00:00:00 2001 From: Konsta Holtta Date: Thu, 1 Feb 2018 14:41:41 +0200 Subject: gpu: nvgpu: use nvgpu_info in refcount tracking Use the nvgpu_info log facility instead of Linux-specific dev_info in gk20a_channel_dump_ref_actions. Also fix format types. dev_info isn't defined anymore in this file and our version is preferred anyway. Refcount tracking isn't compiled in by default, so this has went unnoticed. Jira NVGPU-22 Change-Id: If93b98c9a54d3b0deaf344a355594cb73712399c Signed-off-by: Konsta Holtta Reviewed-on: https://git-master.nvidia.com/r/1663032 Reviewed-by: svc-mobile-coverity Reviewed-by: Deepak Nibade Reviewed-by: Seema Khowala Reviewed-by: Alex Waterman GVS: Gerrit_Virtual_Submit Reviewed-by: Vijayakumar Subbu Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/channel_gk20a.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a/channel_gk20a.c') diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c index 07863ac7..2f5ea301 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c @@ -518,11 +518,11 @@ static void gk20a_channel_dump_ref_actions(struct channel_gk20a *ch) size_t i, get; s64 now = nvgpu_current_time_ms(); s64 prev = 0; - struct device *dev = dev_from_gk20a(ch->g); + struct gk20a *g = ch->g; nvgpu_spinlock_acquire(&ch->ref_actions_lock); - dev_info(dev, "ch %d: refs %d. Actions, most recent last:\n", + nvgpu_info(g, "ch %d: refs %d. Actions, most recent last:", ch->chid, nvgpu_atomic_read(&ch->ref_count)); /* start at the oldest possible entry. put is next insertion point */ @@ -536,7 +536,8 @@ static void gk20a_channel_dump_ref_actions(struct channel_gk20a *ch) struct channel_gk20a_ref_action *act = &ch->ref_actions[get]; if (act->trace.nr_entries) { - dev_info(dev, "%s ref %zu steps ago (age %d ms, diff %d ms)\n", + nvgpu_info(g, + "%s ref %zu steps ago (age %lld ms, diff %lld ms)", act->type == channel_gk20a_ref_action_get ? "GET" : "PUT", GK20A_CHANNEL_REFCOUNT_TRACKING - 1 - i, -- cgit v1.2.2