From b70bad4b9f40e94f731fd9d509e1f3f6617f0b05 Mon Sep 17 00:00:00 2001 From: Alex Waterman Date: Wed, 26 Apr 2017 14:27:02 -0700 Subject: gpu: nvgpu: Refactor gk20a_vm_alloc_va() This function is an internal function to the VM manager that allocates virtual memory space in the GVA allocator. It is unfortunately used in the vGPU code, though. In any event, this patch cleans up and moves the implementation of these functions into the VM common code. JIRA NVGPU-12 JIRA NVGPU-30 Change-Id: I24a3d29b5fcb12615df27d2ac82891d1bacfe541 Signed-off-by: Alex Waterman Reviewed-on: http://git-master/r/1477745 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/vgpu/mm_vgpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/gpu/nvgpu/vgpu/mm_vgpu.c') diff --git a/drivers/gpu/nvgpu/vgpu/mm_vgpu.c b/drivers/gpu/nvgpu/vgpu/mm_vgpu.c index b42fbcb3..b8b5985c 100644 --- a/drivers/gpu/nvgpu/vgpu/mm_vgpu.c +++ b/drivers/gpu/nvgpu/vgpu/mm_vgpu.c @@ -106,7 +106,7 @@ static u64 vgpu_locked_gmmu_map(struct vm_gk20a *vm, /* Allocate (or validate when map_offset != 0) the virtual address. */ if (!map_offset) { - map_offset = gk20a_vm_alloc_va(vm, size, + map_offset = __nvgpu_vm_alloc_va(vm, size, pgsz_idx); if (!map_offset) { nvgpu_err(g, "failed to allocate va space\n"); @@ -180,7 +180,7 @@ static void vgpu_locked_gmmu_unmap(struct vm_gk20a *vm, gk20a_dbg_fn(""); if (va_allocated) { - err = gk20a_vm_free_va(vm, vaddr, size, pgsz_idx); + err = __nvgpu_vm_free_va(vm, vaddr, pgsz_idx); if (err) { dev_err(dev_from_vm(vm), "failed to free va"); -- cgit v1.2.2