From 3ba374a5d94f8c2067731155afaf79f03e6c390c Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Thu, 30 Mar 2017 07:44:03 -0700 Subject: gpu: nvgpu: gk20a: Use new error macro gk20a_err() and gk20a_warn() require a struct device pointer, which is not portable across operating systems. The new nvgpu_err() and nvgpu_warn() macros take struct gk20a pointer. Convert code to use the more portable macros. JIRA NVGPU-16 Change-Id: Ia51f36d94c5ce57a5a0ab83b3c83a6bce09e2d5c Signed-off-by: Terje Bergstrom Reviewed-on: http://git-master/r/1331694 Reviewed-by: svccoveritychecker Reviewed-by: Alex Waterman GVS: Gerrit_Virtual_Submit --- drivers/gpu/nvgpu/gk20a/css_gr_gk20a.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a/css_gr_gk20a.c') diff --git a/drivers/gpu/nvgpu/gk20a/css_gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/css_gr_gk20a.c index e5910e7f..76237e03 100644 --- a/drivers/gpu/nvgpu/gk20a/css_gr_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/css_gr_gk20a.c @@ -27,6 +27,8 @@ #include "gk20a.h" #include "css_gr_gk20a.h" +#include + #include #include @@ -299,8 +301,7 @@ static int css_gr_flush_snapshots(struct channel_gk20a *ch) cur->snapshot->hw_overflow_events_occured++; } - gk20a_warn(dev_from_gk20a(g), - "cyclestats: hardware overflow detected\n"); + nvgpu_warn(g, "cyclestats: hardware overflow detected"); } /* process all items in HW buffer */ @@ -340,8 +341,7 @@ static int css_gr_flush_snapshots(struct channel_gk20a *ch) dst_nxt = dst_head; } else { /* client not found - skipping this entry */ - gk20a_warn(dev_from_gk20a(g), - "cyclestats: orphaned perfmon %u\n", + nvgpu_warn(g, "cyclestats: orphaned perfmon %u", src->perfmon_id); goto next_hw_fifo_entry; } @@ -351,8 +351,7 @@ static int css_gr_flush_snapshots(struct channel_gk20a *ch) if (dst_nxt == dst_get) { /* no data copy, no pointer updates */ dst->sw_overflow_events_occured++; - gk20a_warn(dev_from_gk20a(g), - "cyclestats: perfmon %u soft overflow\n", + nvgpu_warn(g, "cyclestats: perfmon %u soft overflow", src->perfmon_id); } else { *dst_put = *src; @@ -392,8 +391,7 @@ next_hw_fifo_entry: /* not all entries proceed correctly. some of problems */ /* reported as overflows, some as orphaned perfmons, */ /* but it will be better notify with summary about it */ - gk20a_warn(dev_from_gk20a(g), - "cyclestats: completed %u from %u entries\n", + nvgpu_warn(g, "cyclestats: completed %u from %u entries", completed, pending); } -- cgit v1.2.2