gpu: nvgpu: add placeholder for IPA to PA

Add __nvgpu_sgl_phys function that can be used to implement IPA
to PA translation in a subsequent change.
Adapt existing function prototypes to add pointer to gpu context,
as we will need to check if IPA to PA translation is needed.

JIRA EVLR-2442
Bug 200392719

Change-Id: I5a734c958c8277d1bf673c020dafb31263f142d6
Signed-off-by: Thomas Fleury <tfleury@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1673142
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Thomas Fleury
2018-03-07 09:23:53 -08:00
committed by mobile promotions
parent f94c9d19c1
commit 6c33a010d8
9 changed files with 37 additions and 24 deletions

View File

@@ -543,7 +543,7 @@ static int __nvgpu_gmmu_do_update_page_table(struct vm_gk20a *vm,
}
phys_addr = g->ops.mm.gpu_phys_addr(g, attrs,
nvgpu_sgt_get_phys(sgt, sgl)) + space_to_skip;
nvgpu_sgt_get_phys(g, sgt, sgl)) + space_to_skip;
chunk_length = min(length,
nvgpu_sgt_get_length(sgt, sgl) - space_to_skip);
@@ -629,7 +629,7 @@ static int __nvgpu_gmmu_update_page_table(struct vm_gk20a *vm,
sgt ? "MAP" : "UNMAP",
virt_addr,
length,
sgt ? nvgpu_sgt_get_phys(sgt, sgt->sgl) : 0,
sgt ? nvgpu_sgt_get_phys(g, sgt, sgt->sgl) : 0,
space_to_skip,
page_size >> 10,
nvgpu_gmmu_perm_str(attrs->rw_flag),