summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/ctxsw_trace_gk20a.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/ctxsw_trace_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/ctxsw_trace_gk20a.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/ctxsw_trace_gk20a.c b/drivers/gpu/nvgpu/gk20a/ctxsw_trace_gk20a.c
index cc05ceff..546917f1 100644
--- a/drivers/gpu/nvgpu/gk20a/ctxsw_trace_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/ctxsw_trace_gk20a.c
@@ -47,7 +47,7 @@ struct gk20a_ctxsw_dev {
47 size_t size; 47 size_t size;
48 u32 num_ents; 48 u32 num_ents;
49 49
50 atomic_t vma_ref; 50 nvgpu_atomic_t vma_ref;
51 51
52 struct nvgpu_mutex write_lock; 52 struct nvgpu_mutex write_lock;
53}; 53};
@@ -152,7 +152,7 @@ static int gk20a_ctxsw_dev_alloc_buffer(struct gk20a_ctxsw_dev *dev,
152 void *buf; 152 void *buf;
153 int err; 153 int err;
154 154
155 if ((dev->write_enabled) || (atomic_read(&dev->vma_ref))) 155 if ((dev->write_enabled) || (nvgpu_atomic_read(&dev->vma_ref)))
156 return -EBUSY; 156 return -EBUSY;
157 157
158 err = g->ops.fecs_trace.alloc_user_buffer(g, &buf, &size); 158 err = g->ops.fecs_trace.alloc_user_buffer(g, &buf, &size);
@@ -438,18 +438,18 @@ static void gk20a_ctxsw_dev_vma_open(struct vm_area_struct *vma)
438{ 438{
439 struct gk20a_ctxsw_dev *dev = vma->vm_private_data; 439 struct gk20a_ctxsw_dev *dev = vma->vm_private_data;
440 440
441 atomic_inc(&dev->vma_ref); 441 nvgpu_atomic_inc(&dev->vma_ref);
442 gk20a_dbg(gpu_dbg_fn|gpu_dbg_ctxsw, "vma_ref=%d", 442 gk20a_dbg(gpu_dbg_fn|gpu_dbg_ctxsw, "vma_ref=%d",
443 atomic_read(&dev->vma_ref)); 443 nvgpu_atomic_read(&dev->vma_ref));
444} 444}
445 445
446static void gk20a_ctxsw_dev_vma_close(struct vm_area_struct *vma) 446static void gk20a_ctxsw_dev_vma_close(struct vm_area_struct *vma)
447{ 447{
448 struct gk20a_ctxsw_dev *dev = vma->vm_private_data; 448 struct gk20a_ctxsw_dev *dev = vma->vm_private_data;
449 449
450 atomic_dec(&dev->vma_ref); 450 nvgpu_atomic_dec(&dev->vma_ref);
451 gk20a_dbg(gpu_dbg_fn|gpu_dbg_ctxsw, "vma_ref=%d", 451 gk20a_dbg(gpu_dbg_fn|gpu_dbg_ctxsw, "vma_ref=%d",
452 atomic_read(&dev->vma_ref)); 452 nvgpu_atomic_read(&dev->vma_ref));
453} 453}
454 454
455static struct vm_operations_struct gk20a_ctxsw_dev_vma_ops = { 455static struct vm_operations_struct gk20a_ctxsw_dev_vma_ops = {
@@ -497,7 +497,7 @@ static int gk20a_ctxsw_init_devs(struct gk20a *g)
497 err = nvgpu_mutex_init(&dev->write_lock); 497 err = nvgpu_mutex_init(&dev->write_lock);
498 if (err) 498 if (err)
499 return err; 499 return err;
500 atomic_set(&dev->vma_ref, 0); 500 nvgpu_atomic_set(&dev->vma_ref, 0);
501 dev++; 501 dev++;
502 } 502 }
503 return 0; 503 return 0;