Skip to content

Commit 395bf09

Browse files
alexdeuchergregkh
authored andcommitted
drm/amdgpu/sdma7.0: replace BUG_ON() with WARN_ON()
commit e80e28f upstream. 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 9723a8b) Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 2757e6e commit 395bf09

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ static void sdma_v7_0_ring_emit_fence(struct amdgpu_ring *ring, u64 addr, u64 se
389389
amdgpu_ring_write(ring, SDMA_PKT_COPY_LINEAR_HEADER_OP(SDMA_OP_FENCE) |
390390
SDMA_PKT_FENCE_HEADER_MTYPE(0x3)); /* Ucached(UC) */
391391
/* zero in first two bits */
392-
BUG_ON(addr & 0x3);
392+
WARN_ON(addr & 0x3);
393393
amdgpu_ring_write(ring, lower_32_bits(addr));
394394
amdgpu_ring_write(ring, upper_32_bits(addr));
395395
amdgpu_ring_write(ring, lower_32_bits(seq));
@@ -400,7 +400,7 @@ static void sdma_v7_0_ring_emit_fence(struct amdgpu_ring *ring, u64 addr, u64 se
400400
amdgpu_ring_write(ring, SDMA_PKT_COPY_LINEAR_HEADER_OP(SDMA_OP_FENCE) |
401401
SDMA_PKT_FENCE_HEADER_MTYPE(0x3));
402402
/* zero in first two bits */
403-
BUG_ON(addr & 0x3);
403+
WARN_ON(addr & 0x3);
404404
amdgpu_ring_write(ring, lower_32_bits(addr));
405405
amdgpu_ring_write(ring, upper_32_bits(addr));
406406
amdgpu_ring_write(ring, upper_32_bits(seq));

0 commit comments

Comments
 (0)