]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/amdgpu: Add lock around VF RLCG interface
authorVictor Skvortsov <victor.skvortsov@amd.com>
Mon, 27 May 2024 20:10:43 +0000 (16:10 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Aug 2024 13:34:14 +0000 (15:34 +0200)
commite1ab38e99d1607f80a1670a399511a56464c0253
treefb76e1e5e07da8b1656713e98da7dc71a2898e80
parent4fd52f7c2c11d330571c6bde06e5ea508ec25c9d
drm/amdgpu: Add lock around VF RLCG interface

[ Upstream commit e864180ee49b4d30e640fd1e1d852b86411420c9 ]

flush_gpu_tlb may be called from another thread while
device_gpu_recover is running.

Both of these threads access registers through the VF
RLCG interface during VF Full Access. Add a lock around this interface
to prevent race conditions between these threads.

Signed-off-by: Victor Skvortsov <victor.skvortsov@amd.com>
Reviewed-by: Zhigang Luo <zhigang.luo@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h