diff options
author | Konsta Holtta <kholtta@nvidia.com> | 2018-06-14 08:57:03 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-06-18 11:58:40 -0400 |
commit | 2573841d89d54301ef4958cde40ed669bb0f9758 (patch) | |
tree | d77ae9cee3b550b9d1fc38ea046bcc6cfa5f793b | |
parent | 2a2c16af5f9f1ccfc93a13e820d5381e5c881e92 (diff) |
gpu: nvgpu: cast cpu_va in priv cmdbuf trace
Avoid arithmetic on a void pointer by casting the priv cmdbuf pointer to
u32 first, then adding offset.
Jira NVGPU-705
Change-Id: I6734a002bc376f6ff72e5b73b720921bfd63951f
Signed-off-by: Konsta Holtta <kholtta@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1749899
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
-rw-r--r-- | drivers/gpu/nvgpu/os/linux/channel.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/os/linux/channel.c b/drivers/gpu/nvgpu/os/linux/channel.c index 7810bc21..e09939e9 100644 --- a/drivers/gpu/nvgpu/os/linux/channel.c +++ b/drivers/gpu/nvgpu/os/linux/channel.c | |||
@@ -662,7 +662,7 @@ static void gk20a_submit_append_priv_cmdbuf(struct channel_gk20a *c, | |||
662 | 662 | ||
663 | if (cmd->mem->aperture == APERTURE_SYSMEM) | 663 | if (cmd->mem->aperture == APERTURE_SYSMEM) |
664 | trace_gk20a_push_cmdbuf(g->name, 0, cmd->size, 0, | 664 | trace_gk20a_push_cmdbuf(g->name, 0, cmd->size, 0, |
665 | cmd->mem->cpu_va + cmd->off * sizeof(u32)); | 665 | (u32 *)cmd->mem->cpu_va + cmd->off); |
666 | 666 | ||
667 | c->gpfifo.put = (c->gpfifo.put + 1) & (c->gpfifo.entry_num - 1); | 667 | c->gpfifo.put = (c->gpfifo.put + 1) & (c->gpfifo.entry_num - 1); |
668 | } | 668 | } |