mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
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:
committed by
Alex Waterman
parent
aef3367ca5
commit
49c9f0c137
@@ -188,16 +188,15 @@ static int init_mm(struct unit_module *m, struct gk20a *g)
|
||||
low_hole = SZ_4K * 16UL;
|
||||
aperture_size = GK20A_PMU_VA_SIZE;
|
||||
mm->pmu.aperture_size = GK20A_PMU_VA_SIZE;
|
||||
mm->channel.user_size = NV_MM_DEFAULT_USER_SIZE -
|
||||
NV_MM_DEFAULT_KERNEL_SIZE;
|
||||
mm->channel.user_size = NV_MM_DEFAULT_USER_SIZE;
|
||||
mm->channel.kernel_size = NV_MM_DEFAULT_KERNEL_SIZE;
|
||||
|
||||
|
||||
mm->pmu.vm = nvgpu_vm_init(g,
|
||||
g->ops.mm.gmmu.get_default_big_page_size(),
|
||||
low_hole,
|
||||
aperture_size - low_hole,
|
||||
aperture_size,
|
||||
0ULL,
|
||||
nvgpu_safe_sub_u64(aperture_size, low_hole),
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
@@ -538,7 +537,7 @@ int test_mm_dma_alloc_map_fault_injection(struct unit_module *m,
|
||||
* nvgpu_dma_alloc_flags_sys function
|
||||
*/
|
||||
kmem_fi = nvgpu_kmem_get_fault_injection();
|
||||
nvgpu_posix_enable_fault_injection(kmem_fi, true, 5);
|
||||
nvgpu_posix_enable_fault_injection(kmem_fi, true, 1);
|
||||
|
||||
err = nvgpu_dma_alloc_map(g->mm.pmu.vm, SZ_4K, mem);
|
||||
if (err == 0) {
|
||||
|
||||
Reference in New Issue
Block a user