gpu: nvgpu: Fix pgsz_idx used in gk20a_vm_alloc_space()
Alex Waterman [Wed, 30 Nov 2016 22:12:25 +0000 (14:12 -0800)]
Use the correct page size index for pgsz_idx in gk20a_vm_alloc_space().
Previously the page size itself was used, not the page size index.

Bug 1837624

Change-Id: I652f5af5321c1c49dc8eb170d3f92f00c23d2b6f
Signed-off-by: Alex Waterman <alexw@nvidia.com>
(cherry picked from commit fd13e0e1c4e397335c24497a0f92c85934d6185f)
Reviewed-on: http://git-master/r/1503371
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-by: Winnie Hsu <whsu@nvidia.com>

drivers/gpu/nvgpu/gk20a/mm_gk20a.c

index 12f3c09..2a5bd76 100644 (file)
@@ -2319,7 +2319,7 @@ int gk20a_vm_alloc_space(struct gk20a_as_share *as_share,
 
        va_node->vaddr_start = vaddr_start;
        va_node->size = (u64)args->page_size * (u64)args->pages;
-       va_node->pgsz_idx = args->page_size;
+       va_node->pgsz_idx = pgsz_idx;
        INIT_LIST_HEAD(&va_node->va_buffers_list);
        INIT_LIST_HEAD(&va_node->reserved_va_list);