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>
This commit is contained in:
Alex Waterman
2018-09-05 16:09:43 -07:00
committed by mobile promotions
parent ba2a632f03
commit 2c95becc9e
8 changed files with 30 additions and 29 deletions

View File

@@ -359,8 +359,8 @@ int __nvgpu_vm_init(struct mm_gk20a *mm,
user_lp_vma_limit = user_vma_limit;
} else {
user_vma_start = low_hole;
user_vma_limit = __nv_gmmu_va_small_page_limit();
user_lp_vma_start = __nv_gmmu_va_small_page_limit();
user_vma_limit = nvgpu_gmmu_va_small_page_limit();
user_lp_vma_start = nvgpu_gmmu_va_small_page_limit();
user_lp_vma_limit = vm->va_limit - kernel_reserved;
}
} else {
@@ -892,7 +892,7 @@ struct nvgpu_mapped_buf *nvgpu_vm_map(struct vm_gk20a *vm,
if (g->mm.disable_bigpage) {
binfo.pgsz_idx = GMMU_PAGE_SIZE_SMALL;
} else {
binfo.pgsz_idx = __get_pte_size(vm, map_addr,
binfo.pgsz_idx = nvgpu_vm_get_pte_size(vm, map_addr,
min_t(u64, binfo.size, align));
}
map_size = map_size ? map_size : binfo.size;