]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/amdgpu/sdma6.0: replace BUG_ON() with WARN_ON()
authorAlex Deucher <alexander.deucher@amd.com>
Mon, 15 Jun 2026 22:27:54 +0000 (18:27 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 1 Jul 2026 16:58:07 +0000 (12:58 -0400)
There's no need to crash the kernel for these cases.

Reviewed-by: Vitaly Prosyak <vitaly.prosyak@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit c17a508a7d652da3728f8bbc481bfffe96d65a87)
Cc: stable@vger.kernel.org
drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c

index d894b7599c183a4324124e7c05118fe942a933b0..d7537888e60cc7432d3980c435d6cbe8773f4dea 100644 (file)
@@ -361,7 +361,7 @@ static void sdma_v6_0_ring_emit_fence(struct amdgpu_ring *ring, u64 addr, u64 se
        amdgpu_ring_write(ring, SDMA_PKT_COPY_LINEAR_HEADER_OP(SDMA_OP_FENCE) |
                          SDMA_PKT_FENCE_HEADER_MTYPE(0x3)); /* Ucached(UC) */
        /* zero in first two bits */
-       BUG_ON(addr & 0x3);
+       WARN_ON(addr & 0x3);
        amdgpu_ring_write(ring, lower_32_bits(addr));
        amdgpu_ring_write(ring, upper_32_bits(addr));
        amdgpu_ring_write(ring, lower_32_bits(seq));
@@ -372,7 +372,7 @@ static void sdma_v6_0_ring_emit_fence(struct amdgpu_ring *ring, u64 addr, u64 se
                amdgpu_ring_write(ring, SDMA_PKT_COPY_LINEAR_HEADER_OP(SDMA_OP_FENCE) |
                                  SDMA_PKT_FENCE_HEADER_MTYPE(0x3));
                /* zero in first two bits */
-               BUG_ON(addr & 0x3);
+               WARN_ON(addr & 0x3);
                amdgpu_ring_write(ring, lower_32_bits(addr));
                amdgpu_ring_write(ring, upper_32_bits(addr));
                amdgpu_ring_write(ring, upper_32_bits(seq));