gpu: nvgpu: accept user vma size in vm init

Modify nvgpu_vm_init to accept low_hole, user_reserved and
kernel_reserved. This will simplify argument limit checks and make code
more legible.

JIRA NVGPU-5302

Change-Id: I62773dd7b06264a3b6cb8896239b24c49fa69f9b
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2394901
Reviewed-by: automaticguardword <automaticguardword@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Vedashree Vidwans
2020-08-04 18:58:29 -07:00
committed by Alex Waterman
parent aef3367ca5
commit 49c9f0c137
23 changed files with 156 additions and 136 deletions

View File

@@ -84,8 +84,9 @@ int nvgpu_perfbuf_init_vm(struct gk20a *g)
mm->perfbuf.vm = nvgpu_vm_init(g, big_page_size,
big_page_size << 10,
nvgpu_safe_sub_u64(NV_MM_DEFAULT_USER_SIZE,
big_page_size << 10),
NV_MM_DEFAULT_KERNEL_SIZE,
NV_MM_DEFAULT_KERNEL_SIZE + NV_MM_DEFAULT_USER_SIZE,
false, false, false, "perfbuf");
if (mm->perfbuf.vm == NULL) {
return -ENOMEM;