From fbafc7eba41ba7654dfdadf51a53acf1638e9fa1 Mon Sep 17 00:00:00 2001 From: Alex Waterman Date: Mon, 1 May 2017 16:12:16 -0700 Subject: gpu: nvgpu: Refactor VM init/cleanup Refactor the API for initializing and cleaning up VMs. This also involved moving a bunch of GMMU code out into the gmmu code since part of initializing a VM involves initializing the page tables for the VM. JIRA NVGPU-12 JIRA NVGPU-30 Change-Id: I4710f08c26a6e39806f0762a35f6db5c94b64c50 Signed-off-by: Alex Waterman Reviewed-on: http://git-master/r/1477746 GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom --- 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 b8b5985c..63490aa5 100644 --- a/drivers/gpu/nvgpu/vgpu/mm_vgpu.c +++ b/drivers/gpu/nvgpu/vgpu/mm_vgpu.c @@ -364,7 +364,7 @@ static int vgpu_vm_alloc_share(struct gk20a_as_share *as_share, if (user_vma_start < user_vma_limit) { snprintf(name, sizeof(name), "gk20a_as_%d-%dKB", as_share->id, gmmu_page_sizes[gmmu_page_size_small] >> 10); - if (!gk20a_big_pages_possible(vm, user_vma_start, + if (!nvgpu_big_pages_possible(vm, user_vma_start, user_vma_limit - user_vma_start)) vm->big_pages = false; @@ -391,7 +391,7 @@ static int vgpu_vm_alloc_share(struct gk20a_as_share *as_share, snprintf(name, sizeof(name), "gk20a_as_%dKB-sys", gmmu_page_sizes[gmmu_page_size_kernel] >> 10); - if (!gk20a_big_pages_possible(vm, kernel_vma_start, + if (!nvgpu_big_pages_possible(vm, kernel_vma_start, kernel_vma_limit - kernel_vma_start)) vm->big_pages = false; -- cgit v1.2.2