diff options
| author | Kefeng Wang <[email protected]> | 2023-07-28 13:00:41 +0800 |
|---|---|---|
| committer | Andrew Morton <[email protected]> | 2023-08-21 13:37:31 -0700 |
| commit | f7992bfaf3e35059f26a7be13f42eefc1050ced9 (patch) | |
| tree | 40421e423f6084ac5935bed8eef475734e995d3a | |
| parent | 11250fd12eb8a58205e69ea36f19fa8c084afb62 (diff) | |
drm/amdkfd: use vma_is_initial_stack() and vma_is_initial_heap()
Use the helpers to simplify code.
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Kefeng Wang <[email protected]>
Reviewed-by: David Hildenbrand <[email protected]>
Reviewed-by: Felix Kuehling <[email protected]>
Acked-by: Peter Zijlstra (Intel) <[email protected]>
Cc: Alex Deucher <[email protected]>
Cc: "Christian König" <[email protected]>
Cc: "Pan, Xinhui" <[email protected]>
Cc: David Airlie <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: Arnaldo Carvalho de Melo <[email protected]>
Cc: Christian Göttsche <[email protected]>
Cc: Eric Paris <[email protected]>
Cc: Paul Moore <[email protected]>
Cc: Stephen Smalley <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
| -rw-r--r-- | drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_svm.c b/drivers/gpu/drm/amd/amdkfd/kfd_svm.c index 5ff1a5a89d96..0b7bfbd0cb66 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_svm.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_svm.c @@ -2621,10 +2621,7 @@ svm_range_get_range_boundaries(struct kfd_process *p, int64_t addr, return -EFAULT; } - *is_heap_stack = (vma->vm_start <= vma->vm_mm->brk && - vma->vm_end >= vma->vm_mm->start_brk) || - (vma->vm_start <= vma->vm_mm->start_stack && - vma->vm_end >= vma->vm_mm->start_stack); + *is_heap_stack = vma_is_initial_heap(vma) || vma_is_initial_stack(vma); start_limit = max(vma->vm_start >> PAGE_SHIFT, (unsigned long)ALIGN_DOWN(addr, 2UL << 8)); |