[PATCH] drm/amdgpu: fix invalid use of change_bit

Alex Deucher alexdeucher at gmail.com
Mon Mar 18 14:11:02 UTC 2019


On Mon, Mar 18, 2019 at 6:14 AM Christian König
<ckoenig.leichtzumerken at gmail.com> wrote:
>
> 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 at amd.com>
> Cc: stable at vger.kernel.org

Acked-by: Alex Deucher <alexander.deucher at amd.com>

> ---
>  drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
> index 84a4b31246ce..e00fef6962da 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
> @@ -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
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx


More information about the amd-gfx mailing list