mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-23 18:16:01 +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
@@ -80,15 +80,14 @@ static int init_channel_vm(struct unit_module *m, struct nvgpu_channel *ch)
|
||||
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,
|
||||
@@ -486,7 +485,7 @@ int test_sync_create_fail(struct unit_module *m, struct gk20a *g, void *args)
|
||||
* consequtive calls to kmalloc
|
||||
*/
|
||||
ch->vm->syncpt_ro_map_gpu_va = 1ULL;
|
||||
nvgpu_posix_enable_fault_injection(kmem_fi, true, 3);
|
||||
nvgpu_posix_enable_fault_injection(kmem_fi, true, 2);
|
||||
fault_injection_enabled = true;
|
||||
} else {
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user