From 98186ec2c2127c2af65a34f9e697e04f518a79ab Mon Sep 17 00:00:00 2001 From: Debarshi Dutta Date: Thu, 3 Aug 2017 15:34:44 +0530 Subject: gpu: nvgpu: Add wrapper over atomic_t and atomic64_t - added wrapper structs nvgpu_atomic_t and nvgpu_atomic64_t over atomic_t and atomic64_t - added nvgpu_atomic_* and nvgpu_atomic64_* APIs to access the above wrappers. JIRA NVGPU-121 Change-Id: I61667bb0a84c2fc475365abb79bffb42b8b4786a Signed-off-by: Debarshi Dutta Reviewed-on: https://git-master.nvidia.com/r/1533044 Reviewed-by: svccoveritychecker Reviewed-by: svc-mobile-coverity Reviewed-by: Terje Bergstrom GVS: Gerrit_Virtual_Submit --- drivers/gpu/nvgpu/vgpu/fifo_vgpu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers/gpu/nvgpu/vgpu') diff --git a/drivers/gpu/nvgpu/vgpu/fifo_vgpu.c b/drivers/gpu/nvgpu/vgpu/fifo_vgpu.c index f1ae2f1f..c8519905 100644 --- a/drivers/gpu/nvgpu/vgpu/fifo_vgpu.c +++ b/drivers/gpu/nvgpu/vgpu/fifo_vgpu.c @@ -43,7 +43,7 @@ static void vgpu_channel_bind(struct channel_gk20a *ch) WARN_ON(err || msg.ret); wmb(); - atomic_set(&ch->bound, true); + nvgpu_atomic_set(&ch->bound, true); } static void vgpu_channel_unbind(struct channel_gk20a *ch) @@ -51,7 +51,7 @@ static void vgpu_channel_unbind(struct channel_gk20a *ch) gk20a_dbg_fn(""); - if (atomic_cmpxchg(&ch->bound, true, false)) { + if (nvgpu_atomic_cmpxchg(&ch->bound, true, false)) { struct tegra_vgpu_cmd_msg msg; struct tegra_vgpu_channel_config_params *p = &msg.params.channel_config; @@ -425,7 +425,7 @@ static int vgpu_fifo_preempt_channel(struct gk20a *g, u32 chid) gk20a_dbg_fn(""); - if (!atomic_read(&ch->bound)) + if (!nvgpu_atomic_read(&ch->bound)) return 0; msg.cmd = TEGRA_VGPU_CMD_CHANNEL_PREEMPT; -- cgit v1.2.2