summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common/mm/vm.c
diff options
context:
space:
mode:
authorAlex Waterman <alexw@nvidia.com>2018-09-05 19:09:43 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-09-12 20:48:24 -0400
commit2c95becc9edf5e9ebfa392c4b6c3fbd0b9580f8d (patch)
treeacacafd7aef3db7b98245f144817895eb8b0ff09 /drivers/gpu/nvgpu/common/mm/vm.c
parentba2a632f039af2d13db9a0e4df9e34206116aef0 (diff)
gpu: nvgpu: Fix MISRA 21.2 violations (nvgpu_mem.c, mm.c)
MISRA 21.2 states that we may not use reserved identifiers; since all identifiers beginning with '_' are reserved by libc, the usage of '__' as a prefix is disallowed. Handle the 21.2 fixes for nvgpu_mem.c and mm.c; this deletes the '__' prefixes and slightly renames the __nvgpu_aperture_mask() function since there's a coherent version and a general version. Change-Id: Iee871ad90db3f2622f9099bd9992eb994e0fbf34 Signed-off-by: Alex Waterman <alexw@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1813623 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/common/mm/vm.c')
-rw-r--r--drivers/gpu/nvgpu/common/mm/vm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/common/mm/vm.c b/drivers/gpu/nvgpu/common/mm/vm.c
index b2b83767..27667f34 100644
--- a/drivers/gpu/nvgpu/common/mm/vm.c
+++ b/drivers/gpu/nvgpu/common/mm/vm.c
@@ -359,8 +359,8 @@ int __nvgpu_vm_init(struct mm_gk20a *mm,
359 user_lp_vma_limit = user_vma_limit; 359 user_lp_vma_limit = user_vma_limit;
360 } else { 360 } else {
361 user_vma_start = low_hole; 361 user_vma_start = low_hole;
362 user_vma_limit = __nv_gmmu_va_small_page_limit(); 362 user_vma_limit = nvgpu_gmmu_va_small_page_limit();
363 user_lp_vma_start = __nv_gmmu_va_small_page_limit(); 363 user_lp_vma_start = nvgpu_gmmu_va_small_page_limit();
364 user_lp_vma_limit = vm->va_limit - kernel_reserved; 364 user_lp_vma_limit = vm->va_limit - kernel_reserved;
365 } 365 }
366 } else { 366 } else {
@@ -892,7 +892,7 @@ struct nvgpu_mapped_buf *nvgpu_vm_map(struct vm_gk20a *vm,
892 if (g->mm.disable_bigpage) { 892 if (g->mm.disable_bigpage) {
893 binfo.pgsz_idx = GMMU_PAGE_SIZE_SMALL; 893 binfo.pgsz_idx = GMMU_PAGE_SIZE_SMALL;
894 } else { 894 } else {
895 binfo.pgsz_idx = __get_pte_size(vm, map_addr, 895 binfo.pgsz_idx = nvgpu_vm_get_pte_size(vm, map_addr,
896 min_t(u64, binfo.size, align)); 896 min_t(u64, binfo.size, align));
897 } 897 }
898 map_size = map_size ? map_size : binfo.size; 898 map_size = map_size ? map_size : binfo.size;