diff options
Diffstat (limited to 'drivers/gpu/nvgpu/common/mm')
-rw-r--r-- | drivers/gpu/nvgpu/common/mm/vm.c | 8 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/common/mm/vm_area.c | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/drivers/gpu/nvgpu/common/mm/vm.c b/drivers/gpu/nvgpu/common/mm/vm.c index 3ed3c7fe..2e2f52df 100644 --- a/drivers/gpu/nvgpu/common/mm/vm.c +++ b/drivers/gpu/nvgpu/common/mm/vm.c | |||
@@ -404,7 +404,7 @@ static int __nvgpu_vm_init(struct mm_gk20a *mm, | |||
404 | vm->mapped_buffers = NULL; | 404 | vm->mapped_buffers = NULL; |
405 | 405 | ||
406 | nvgpu_mutex_init(&vm->update_gmmu_lock); | 406 | nvgpu_mutex_init(&vm->update_gmmu_lock); |
407 | kref_init(&vm->ref); | 407 | nvgpu_ref_init(&vm->ref); |
408 | nvgpu_init_list_node(&vm->vm_area_list); | 408 | nvgpu_init_list_node(&vm->vm_area_list); |
409 | 409 | ||
410 | /* | 410 | /* |
@@ -557,7 +557,7 @@ static void __nvgpu_vm_remove(struct vm_gk20a *vm) | |||
557 | nvgpu_kfree(g, vm); | 557 | nvgpu_kfree(g, vm); |
558 | } | 558 | } |
559 | 559 | ||
560 | static void __nvgpu_vm_remove_kref(struct kref *ref) | 560 | static void __nvgpu_vm_remove_ref(struct nvgpu_ref *ref) |
561 | { | 561 | { |
562 | struct vm_gk20a *vm = container_of(ref, struct vm_gk20a, ref); | 562 | struct vm_gk20a *vm = container_of(ref, struct vm_gk20a, ref); |
563 | 563 | ||
@@ -566,12 +566,12 @@ static void __nvgpu_vm_remove_kref(struct kref *ref) | |||
566 | 566 | ||
567 | void nvgpu_vm_get(struct vm_gk20a *vm) | 567 | void nvgpu_vm_get(struct vm_gk20a *vm) |
568 | { | 568 | { |
569 | kref_get(&vm->ref); | 569 | nvgpu_ref_get(&vm->ref); |
570 | } | 570 | } |
571 | 571 | ||
572 | void nvgpu_vm_put(struct vm_gk20a *vm) | 572 | void nvgpu_vm_put(struct vm_gk20a *vm) |
573 | { | 573 | { |
574 | kref_put(&vm->ref, __nvgpu_vm_remove_kref); | 574 | nvgpu_ref_put(&vm->ref, __nvgpu_vm_remove_ref); |
575 | } | 575 | } |
576 | 576 | ||
577 | int nvgpu_insert_mapped_buf(struct vm_gk20a *vm, | 577 | int nvgpu_insert_mapped_buf(struct vm_gk20a *vm, |
diff --git a/drivers/gpu/nvgpu/common/mm/vm_area.c b/drivers/gpu/nvgpu/common/mm/vm_area.c index 7b831947..19864439 100644 --- a/drivers/gpu/nvgpu/common/mm/vm_area.c +++ b/drivers/gpu/nvgpu/common/mm/vm_area.c | |||
@@ -202,7 +202,7 @@ int nvgpu_vm_area_free(struct vm_gk20a *vm, u64 addr) | |||
202 | &vm_area->buffer_list_head, | 202 | &vm_area->buffer_list_head, |
203 | nvgpu_mapped_buf, buffer_list) { | 203 | nvgpu_mapped_buf, buffer_list) { |
204 | nvgpu_list_del(&buffer->buffer_list); | 204 | nvgpu_list_del(&buffer->buffer_list); |
205 | kref_put(&buffer->ref, gk20a_vm_unmap_locked_kref); | 205 | nvgpu_ref_put(&buffer->ref, gk20a_vm_unmap_locked_ref); |
206 | } | 206 | } |
207 | 207 | ||
208 | /* if this was a sparse mapping, free the va */ | 208 | /* if this was a sparse mapping, free the va */ |