gpu: nvgpu: accept small_big_split in vm_init

Currently, when unified address space is not requested, nvgpu_vm_init
splits user vm at a fixed address of 56G.
Modify nvgpu_vm_init to allow user to specify small big page vm split.

JIRA NVGPU-5302

Change-Id: I6ed33a4dc080f10a723cb9bd486f0d36c0cee0e9
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2428326
Reviewed-by: automaticguardword <automaticguardword@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Sami Kiminki <skiminki@nvidia.com>
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
Tested-by: Sami Kiminki <skiminki@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Vedashree Vidwans
2020-10-14 19:05:47 -07:00
committed by Alex Waterman
parent 7f9ce100f8
commit 00d1e10ff2
20 changed files with 90 additions and 44 deletions

View File

@@ -735,6 +735,7 @@ void nvgpu_insert_mapped_buf(struct vm_gk20a *vm,
* the address space).
* @param user_reserved [in] Space reserved for user allocations.
* @param kernel_reserved [in] Space reserved for kernel only allocations.
* @param small_big_split [in] Specifies small big page address split.
* @param big_pages [in] If true then big pages are possible in the
* VM. Note this does not guarantee that big
* pages will be possible.
@@ -763,6 +764,7 @@ int nvgpu_vm_do_init(struct mm_gk20a *mm,
u64 low_hole,
u64 user_reserved,
u64 kernel_reserved,
u64 small_big_split,
bool big_pages,
bool userspace_managed,
bool unified_va,
@@ -779,6 +781,7 @@ int nvgpu_vm_do_init(struct mm_gk20a *mm,
* the address space).
* @param user_reserved [in] Space reserved for user allocations.
* @param kernel_reserved [in] Space reserved for kernel only allocations.
* @param small_big_split [in] Specifies small big page address split.
* @param big_pages [in] If true then big pages are possible in the
* VM. Note this does not guarantee that big
* pages will be possible.
@@ -792,11 +795,11 @@ int nvgpu_vm_do_init(struct mm_gk20a *mm,
* | |
* +--+ @low_hole
* | |
* ~ ~ This is the "user" section.
* ~ ~ This is the "user" section, @user_reserved.
* | |
* +--+ @aperture_size - @kernel_reserved
* | |
* ~ ~ This is the "kernel" section.
* ~ ~ This is the "kernel" section, @kernel_reserved.
* | |
* +--+ @aperture_size
*
@@ -819,6 +822,7 @@ struct vm_gk20a *nvgpu_vm_init(struct gk20a *g,
u64 low_hole,
u64 user_reserved,
u64 kernel_reserved,
u64 small_big_split,
bool big_pages,
bool userspace_managed,
bool unified_va,