Release the mutex hold before backtracing for not supported mxgpu.
Subsystems (2)
PATCH 1/1 Release the mutex hold before backtracing for not supported mxgpu.
This patch releases the mutex held soon before entering the initialization function in case the device doesn't support mxgpu.
--- drivers/gpu/drm/amd/amdgpu/mxgpu_vi.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/mxgpu_vi.c +1 -0
@@ -307,6 +307,7 @@ void xgpu_vi_init_golden_registers(struct amdgpu_device *adev) xgpu_tonga_golden_common_all));break ;default : +mutex_unlock (&adev->grbm_idx_mutex);BUG_ON ("Doesn't support chip type.\n" );break ; }
Signature · 6 lines
2.13.6 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 20171219083732.18082-1-koalinux-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Quoted 21 lines
This patch releases the mutex held soon before entering the initialization function in case the device doesn't support mxgpu.
Signed-off-by José Pekkarinen <[email protected]>--- drivers/gpu/drm/amd/amdgpu/mxgpu_vi.c | 1 + 1 file changed, 1 insertion(+)drivers/gpu/drm/amd/amdgpu/mxgpu_vi.c +1
-0@@ -307,6 +307,7 @@ void xgpu_vi_init_golden_registers(struct amdgpu_device *adev) xgpu_tonga_golden_common_all));break ;default : +mutex_unlock (&adev->grbm_idx_mutex);BUG_ON ("Doesn't support chip type.\n" );
drivers/gpu/drm/amd/amdgpu/mxgpu_vi.c
Quoted 2 lines
drivers/gpu/drm/amd/amdgpu/mxgpu_vi.c +0
-0break ; }
The release mutex in here has no meaning as kernel will hang later. And Alex has submitted patch to check ASIC IP during detecting SRIOV, so we can't see the case anymore. Please drop the patch.
Thanks!
Quoted 7 lines
--
2.13.6_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): BY2PR1201MB093521CE50B95283C8A047E2EB0C0-O28G1zQ8oGkaqtME6NEo1mrFom/aUZj6nBOFsp37pqbUKgpGm//BTAC/[email protected]
Am 20.12.2017 um 03:44 schrieb Yu, Xiangliang:
Quoted 16 lines
Quoted 16 lines
This patch releases the mutex held soon before entering the initialization function in case the device doesn't support mxgpu.
Signed-off-by José Pekkarinen <[email protected]>--- drivers/gpu/drm/amd/amdgpu/mxgpu_vi.c | 1 + 1 file changed, 1 insertion(+)drivers/gpu/drm/amd/amdgpu/mxgpu_vi.c +0
-0@@ -307,6 +307,7 @@ void xgpu_vi_init_golden_registers(struct amdgpu_device *adev)
Quoted 8 lines
Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/mxgpu_vi.c +1
-0xgpu_tonga_golden_common_all));break ;default : +mutex_unlock (&adev->grbm_idx_mutex);BUG_ON ("Doesn't support chip type.\n" );break; }The release mutex in here has no meaning as kernel will hang later.
A BUG_ON() results in killing the current process/thread. That usually results in a kernel hang *BECAUSE* you usually don't cleanly unlock all the taken locks.
So this patch is actually the first step on cleaning up the code.
BTW: Also please use BUG() + comment instead of BUG_ON() with a fixed text.
Thanks,
Christian.
Quoted 7 lines
And Alex has submitted patch to check ASIC IP during detecting SRIOV, so we can't see the case anymore. Please drop the patch.
Thanks!
Quoted 3 lines
--
2.13.6
Quoted 8 lines
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx