From: Mukul Joshi <[email protected]>

The UALink exp_xa, imp_xa and handle_invalid_xa xarrays are only ever
accessed from process context: ioctls or workqueues. None of them run
in softirq or hardirq context, so initializing the Xarray with BH flag
is unnecessary.

Drop XA_FLAGS_LOCK_BH and use the default plain-spinlock locking
(xa_init() and the plain xa_* accessors).

Signed-off-by: Mukul Joshi <[email protected]>
Reviewed-by: Harish Kasiviswanathan <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ualink.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ualink.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_ualink.c
index 451c3437f5bd5..be38e9ab47a7b 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ualink.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ualink.c
@@ -3447,9 +3447,9 @@ int amdgpu_ualink_manager_start(struct amdgpu_device 
*adev)
        adev->mmhub.funcs->setup_vm_pt_regs(adev, adev->vm_manager.npa_vmid,
                        amdgpu_gmc_pd_addr(adev->ualink.npa_vm.root.bo));
 
-       xa_init_flags(&adev->ualink.exp_xa, XA_FLAGS_LOCK_BH);
-       xa_init_flags(&adev->ualink.imp_xa, XA_FLAGS_LOCK_BH);
-       xa_init_flags(&adev->ualink.handle_invalid_xa, XA_FLAGS_LOCK_BH);
+       xa_init(&adev->ualink.exp_xa);
+       xa_init(&adev->ualink.imp_xa);
+       xa_init(&adev->ualink.handle_invalid_xa);
 
        for (i = 0; i < AMDGPU_UALINK_ACCEL_MAX; i++) {
                init_completion(&adev->ualink.conn_state[i].hello_done);
-- 
2.55.0

Reply via email to