mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-23 01:50:07 +03:00
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 <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/1331694 Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com> Reviewed-by: Alex Waterman <alexw@nvidia.com> GVS: Gerrit_Virtual_Submit
This commit is contained in:
committed by
mobile promotions
parent
2be51206af
commit
3ba374a5d9
@@ -27,6 +27,8 @@
|
||||
#include "gk20a.h"
|
||||
#include "css_gr_gk20a.h"
|
||||
|
||||
#include <nvgpu/log.h>
|
||||
|
||||
#include <nvgpu/hw/gk20a/hw_perf_gk20a.h>
|
||||
#include <nvgpu/hw/gk20a/hw_mc_gk20a.h>
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user