drm/amdgpu: fix invalid use of change_bit
Subsystems (2)
PATCH 1/1 drm/amdgpu: fix invalid use of change_bit
We only need to clear the bit in a 32bit integer.
This fixes a crah on ARM64 and PPC64LE caused by "drm/amdgpu: update the vm invalidation engine layout V2"
--- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +1 -1
@@ -647,7 +647,7 @@ static int gmc_v9_0_allocate_vm_inv_eng(struct amdgpu_device *adev) } ring->vm_inv_eng = inv_eng -1 ; -change_bit (inv_eng -1 , (unsigned long *)(&vm_inv_engs[vmhub])); + vm_inv_engs[vmhub] &= ~(1 << ring->vm_inv_eng);dev_info (adev->dev,"ring %s uses VM inv eng %u on hub %u\n" , ring->name, ring->vm_inv_eng, ring->funcs->vmhub);
Signature · 6 lines
2.17.1 _______________________________________________ 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): 20190318101401.18479-1-christian.koenig-5C7GfCeVMHo@public.gmane.org
Alex Deucher
Acked-byQuoted 8 lines · Christian König
We only need to clear the bit in a 32bit integer.
This fixes a crah on ARM64 and PPC64LE caused by "drm/amdgpu: update the vm invalidation engine layout V2"
Signed-off-by Christian König <[email protected]>
Quoted 20 lines
--- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +1
-2@@ -647,7 +647,7 @@ static int gmc_v9_0_allocate_vm_inv_eng(struct amdgpu_device *adev) } ring->vm_inv_eng = inv_eng -1 ; -change_bit (inv_eng -1 , (unsigned long *)(&vm_inv_engs[vmhub])); + vm_inv_engs[vmhub] &= ~(1 << ring->vm_inv_eng);dev_info (adev->dev,"ring %s uses VM inv eng %u on hub %u\n" , ring->name, ring->vm_inv_eng, ring->funcs->vmhub); --2.17.1
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