diff options
author | Alex Sierra <alex.sierra@amd.com> | 2023-08-15 15:42:52 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2023-08-31 17:54:41 -0400 |
commit | 3aca8cca606be64c7cd6b61b36c8208bab37d44b (patch) | |
tree | dc17585944ad40413021a886ece3dfa0dce841ac /drivers/gpu | |
parent | bae44a8fcb6e7e244a524b7f3da35b69aa7bb4b3 (diff) |
drm/amdkfd: retry after EBUSY is returned from hmm_ranges_get_pages
if hmm_range_get_pages returns EBUSY error during
svm_range_validate_and_map, within the context of a page fault
interrupt. This should retry through svm_range_restore_pages
callback. Therefore we treat this as EAGAIN error instead, and defer
it to restore pages fallback.
Signed-off-by: Alex Sierra <alex.sierra@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_svm.c b/drivers/gpu/drm/amd/amdkfd/kfd_svm.c index dbbe6559d6bc..49b62c2172cc 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_svm.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_svm.c @@ -1686,6 +1686,8 @@ static int svm_range_validate_and_map(struct mm_struct *mm, WRITE_ONCE(p->svms.faulting_task, NULL); if (r) { pr_debug("failed %d to get svm range pages\n", r); + if (r == -EBUSY) + r = -EAGAIN; goto unreserve_out; } |