gpu: nvgpu: rename gk20a_locked_gmmu_map() and move to gmmu.h

Rename the two native GPU GMMU map/unmap functions and update the
HAL initializations to reflect this:

  gk20a_locked_gmmu_map   -> nvgpu_gmmu_map_locked
  gk20a_locked_gmmu_unmap -> nvgpu_gmmu_unmap_locked

This matches what other units do for handling vGPU "HAL" indirection.

Also move the function declarations to <nvgpu/gmmu.h> since these are
shared among all non-vGPU chips. But since these are still technically
HAL operations they should never be called directly. This is a bit of
an organixational issue that I have not thought through hwo to solve
yet.

Ideally they would go into a "hal/mm/gmmu/" include somewhere, but
that A) doesn't yet exist, and B) those are chip specific; these
functions are native specific. Ugh.

JIRA NVGPU-2042

Change-Id: Ibc614f2928630d12eafcec6ce73019628b44ad94
Signed-off-by: Alex Waterman <alexw@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2099692
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com>
Reviewed-by: Seshendra Gadagottu <sgadagottu@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Alex Waterman
2019-04-15 12:19:46 -07:00
committed by mobile promotions
parent 0561bace40
commit 32eea0988c
12 changed files with 48 additions and 48 deletions

View File

@@ -750,7 +750,7 @@ static int __nvgpu_gmmu_update_page_table(struct vm_gk20a *vm,
}
/**
* gk20a_locked_gmmu_map - Map a buffer into the GMMU
* nvgpu_gmmu_map_locked - Map a buffer into the GMMU
*
* This is for non-vGPU chips. It's part of the HAL at the moment but really
* should not be. Chip specific stuff is handled at the PTE/PDE programming
@@ -761,7 +761,7 @@ static int __nvgpu_gmmu_update_page_table(struct vm_gk20a *vm,
* mm.gmmu_lock() HAL. So before calling the mm.gmmu_lock() HAL make sure you
* have the update_gmmu_lock aquired.
*/
u64 gk20a_locked_gmmu_map(struct vm_gk20a *vm,
u64 nvgpu_gmmu_map_locked(struct vm_gk20a *vm,
u64 vaddr,
struct nvgpu_sgt *sgt,
u64 buffer_offset,
@@ -847,7 +847,7 @@ fail_alloc:
return 0;
}
void gk20a_locked_gmmu_unmap(struct vm_gk20a *vm,
void nvgpu_gmmu_unmap_locked(struct vm_gk20a *vm,
u64 vaddr,
u64 size,
u32 pgsz_idx,