diff options
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/mm_gk20a.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c index d896d783..5e1505c4 100644 --- a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c | |||
@@ -2288,8 +2288,8 @@ static int update_gmmu_level_locked(struct vm_gk20a *vm, | |||
2288 | (l->hi_bit[pgsz_idx] | 2288 | (l->hi_bit[pgsz_idx] |
2289 | - l->lo_bit[pgsz_idx] + 1); | 2289 | - l->lo_bit[pgsz_idx] + 1); |
2290 | pte->entries = | 2290 | pte->entries = |
2291 | kzalloc(sizeof(struct gk20a_mm_entry) * | 2291 | vzalloc(sizeof(struct gk20a_mm_entry) * |
2292 | num_entries, GFP_KERNEL); | 2292 | num_entries); |
2293 | if (!pte->entries) | 2293 | if (!pte->entries) |
2294 | return -ENOMEM; | 2294 | return -ENOMEM; |
2295 | pte->pgsz = pgsz_idx; | 2295 | pte->pgsz = pgsz_idx; |
@@ -2504,7 +2504,7 @@ static void gk20a_vm_free_entries(struct vm_gk20a *vm, | |||
2504 | 2504 | ||
2505 | if (parent->size) | 2505 | if (parent->size) |
2506 | free_gmmu_pages(vm, parent); | 2506 | free_gmmu_pages(vm, parent); |
2507 | kfree(parent->entries); | 2507 | vfree(parent->entries); |
2508 | parent->entries = NULL; | 2508 | parent->entries = NULL; |
2509 | } | 2509 | } |
2510 | 2510 | ||
@@ -2635,8 +2635,8 @@ int gk20a_init_vm(struct mm_gk20a *mm, | |||
2635 | pde_range_from_vaddr_range(vm, | 2635 | pde_range_from_vaddr_range(vm, |
2636 | 0, vm->va_limit-1, | 2636 | 0, vm->va_limit-1, |
2637 | &pde_lo, &pde_hi); | 2637 | &pde_lo, &pde_hi); |
2638 | vm->pdb.entries = kzalloc(sizeof(struct gk20a_mm_entry) * | 2638 | vm->pdb.entries = vzalloc(sizeof(struct gk20a_mm_entry) * |
2639 | (pde_hi + 1), GFP_KERNEL); | 2639 | (pde_hi + 1)); |
2640 | vm->pdb.num_entries = pde_hi + 1; | 2640 | vm->pdb.num_entries = pde_hi + 1; |
2641 | 2641 | ||
2642 | if (!vm->pdb.entries) | 2642 | if (!vm->pdb.entries) |
@@ -2703,7 +2703,7 @@ clean_up_small_allocator: | |||
2703 | clean_up_ptes: | 2703 | clean_up_ptes: |
2704 | free_gmmu_pages(vm, &vm->pdb); | 2704 | free_gmmu_pages(vm, &vm->pdb); |
2705 | clean_up_pdes: | 2705 | clean_up_pdes: |
2706 | kfree(vm->pdb.entries); | 2706 | vfree(vm->pdb.entries); |
2707 | return err; | 2707 | return err; |
2708 | } | 2708 | } |
2709 | 2709 | ||