amd/amdkfd: sync all devices to wait all processes being evicted
authorZhigang Luo <Zhigang.Luo@amd.com>
Mon, 18 Mar 2024 18:13:10 +0000 (14:13 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 10 Apr 2024 03:28:30 +0000 (23:28 -0400)
commitd06af584be5a769d124b7302b32a033e9559761d
tree63c0adfaeca0fb7cbc52738489180773eafd7ae8
parente33997e18d0fddd217a0fce988abbfd015338631
amd/amdkfd: sync all devices to wait all processes being evicted

If there are more than one device doing reset in parallel, the first
device will call kfd_suspend_all_processes() to evict all processes
on all devices, this call takes time to finish. other device will
start reset and recover without waiting. if the process has not been
evicted before doing recover, it will be restored, then caused page
fault.

Signed-off-by: Zhigang Luo <Zhigang.Luo@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_device.c