drm/amd/amdgpu: add missing mutex lock to amdgpu_get_xgmi_hive() (v3)
authorTom St Denis <tom.stdenis@amd.com>
Mon, 7 Jan 2019 22:39:10 +0000 (17:39 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 14 Jan 2019 20:04:53 +0000 (15:04 -0500)
commit22d6575b8db59097655797c740bf840a616a6816
treea8d7ac8678e9940f2ebfe9d00268e83be1cc3c36
parent4b9674e509ea4365b68c5e309c402ef6544d567a
drm/amd/amdgpu: add missing mutex lock to amdgpu_get_xgmi_hive() (v3)

v2: Move locks around in other functions so that this
function can stand on its own.  Also only hold the hive
specific lock for add/remove device instead of the driver
global lock so you can't add/remove devices in parallel from
one hive.

v3: add reset_lock

Acked-by: Shaoyun.liu < Shaoyun.liu@amd.com>
Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
Reviewed-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c
drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.h