diff options
author | Debarshi Dutta <ddutta@nvidia.com> | 2017-08-03 06:04:44 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-08-17 17:26:47 -0400 |
commit | 98186ec2c2127c2af65a34f9e697e04f518a79ab (patch) | |
tree | 08ad87f3bf8c739e96b36f01728a8f7a30749a0e /drivers/gpu/nvgpu/common/semaphore.c | |
parent | 49dc335cfe588179cbb42d8bab53bc76ba88b28f (diff) |
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 <ddutta@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1533044
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
GVS: Gerrit_Virtual_Submit
Diffstat (limited to 'drivers/gpu/nvgpu/common/semaphore.c')
-rw-r--r-- | drivers/gpu/nvgpu/common/semaphore.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/common/semaphore.c b/drivers/gpu/nvgpu/common/semaphore.c index 3e916b9d..ac45aaaa 100644 --- a/drivers/gpu/nvgpu/common/semaphore.c +++ b/drivers/gpu/nvgpu/common/semaphore.c | |||
@@ -364,7 +364,7 @@ static int __nvgpu_init_hw_sema(struct channel_gk20a *ch) | |||
364 | hw_sema->p = p; | 364 | hw_sema->p = p; |
365 | hw_sema->idx = hw_sema_idx; | 365 | hw_sema->idx = hw_sema_idx; |
366 | hw_sema->offset = SEMAPHORE_SIZE * hw_sema_idx; | 366 | hw_sema->offset = SEMAPHORE_SIZE * hw_sema_idx; |
367 | atomic_set(&hw_sema->next_value, 0); | 367 | nvgpu_atomic_set(&hw_sema->next_value, 0); |
368 | nvgpu_init_list_node(&hw_sema->hw_sema_list); | 368 | nvgpu_init_list_node(&hw_sema->hw_sema_list); |
369 | nvgpu_mem_wr(ch->g, &p->rw_mem, hw_sema->offset, 0); | 369 | nvgpu_mem_wr(ch->g, &p->rw_mem, hw_sema->offset, 0); |
370 | 370 | ||
@@ -425,7 +425,7 @@ struct nvgpu_semaphore *nvgpu_semaphore_alloc(struct channel_gk20a *ch) | |||
425 | 425 | ||
426 | kref_init(&s->ref); | 426 | kref_init(&s->ref); |
427 | s->hw_sema = ch->hw_sema; | 427 | s->hw_sema = ch->hw_sema; |
428 | atomic_set(&s->value, 0); | 428 | nvgpu_atomic_set(&s->value, 0); |
429 | 429 | ||
430 | /* | 430 | /* |
431 | * Take a ref on the pool so that we can keep this pool alive for | 431 | * Take a ref on the pool so that we can keep this pool alive for |