OSDN Git Service

drm/amdkfd: fix svm_bo release invalid wait context warning
authorPhilip Yang <Philip.Yang@amd.com>
Wed, 24 Nov 2021 13:49:15 +0000 (08:49 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 16 Dec 2021 18:43:46 +0000 (13:43 -0500)
commit69879b3083cc5022585d1826c663c330efae4e63
tree4d34b35c8c82ac5e25ea6fd9fa313bb876c99bff
parent5c1e6fa49e8d8dbdd8bb457492b2bc52718df244
drm/amdkfd: fix svm_bo release invalid wait context warning

Add svm_range_bo_unref_async to schedule work to wait for svm_bo
eviction work done and then free svm_bo. __do_munmap put_page
is atomic context, call svm_range_bo_unref_async to avoid warning
invalid wait context. Other non atomic context call svm_range_bo_unref.

Signed-off-by: Philip Yang <Philip.Yang@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_migrate.c
drivers/gpu/drm/amd/amdkfd/kfd_svm.c
drivers/gpu/drm/amd/amdkfd/kfd_svm.h