From 2fa54c94a67e13d84df980d646674dde0ad27168 Mon Sep 17 00:00:00 2001 From: Alex Waterman Date: Wed, 21 Sep 2016 14:24:59 -0700 Subject: gpu: nvgpu: Remove global debugfs variable Remove a global debugfs variable and instead save the allocator debugfs root node in the gk20a struct. Bug 1799159 Change-Id: If4eed34fa24775e962001e34840b334658f2321c Signed-off-by: Alex Waterman Reviewed-on: http://git-master/r/1225611 (cherry picked from commit 1908fde10bb1fb60ce898ea329f5a441a3e4297a) Reviewed-on: http://git-master/r/1242390 GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom --- drivers/gpu/nvgpu/vgpu/mm_vgpu.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'drivers/gpu/nvgpu/vgpu') diff --git a/drivers/gpu/nvgpu/vgpu/mm_vgpu.c b/drivers/gpu/nvgpu/vgpu/mm_vgpu.c index b256598f..9a305fd5 100644 --- a/drivers/gpu/nvgpu/vgpu/mm_vgpu.c +++ b/drivers/gpu/nvgpu/vgpu/mm_vgpu.c @@ -371,6 +371,7 @@ static int vgpu_vm_alloc_share(struct gk20a_as_share *as_share, gmmu_page_sizes[gmmu_page_size_small] >> 10); err = __gk20a_buddy_allocator_init( + g, &vm->vma[gmmu_page_size_small], vm, name, small_vma_start, @@ -386,6 +387,7 @@ static int vgpu_vm_alloc_share(struct gk20a_as_share *as_share, snprintf(name, sizeof(name), "gk20a_as_%d-%dKB", as_share->id, gmmu_page_sizes[gmmu_page_size_big] >> 10); err = __gk20a_buddy_allocator_init( + g, &vm->vma[gmmu_page_size_big], vm, name, large_vma_start, @@ -402,7 +404,9 @@ static int vgpu_vm_alloc_share(struct gk20a_as_share *as_share, /* * kernel reserved VMA is at the end of the aperture */ - err = __gk20a_buddy_allocator_init(&vm->vma[gmmu_page_size_kernel], + err = __gk20a_buddy_allocator_init( + g, + &vm->vma[gmmu_page_size_kernel], vm, name, kernel_vma_start, kernel_vma_limit - kernel_vma_start, -- cgit v1.2.2