drm/amdgpu: fix invalid use of change_bit
authorChristian König <christian.koenig@amd.com>
Mon, 18 Mar 2019 10:09:54 +0000 (11:09 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 19 Mar 2019 19:01:42 +0000 (14:01 -0500)
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 <christian.koenig@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c

index 600259b4e29184a5ce05f3441151a7a2f2bf7223..2fe8397241ea4c128ed7fffc924955ac483daec8 100644 (file)
@@ -742,7 +742,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);