]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commit
dmaengine: sh: rz-dmac: Move CHCTRL updates under spinlock
authorClaudiu Beznea <claudiu.beznea@tuxon.dev>
Mon, 16 Mar 2026 13:32:46 +0000 (15:32 +0200)
committerVinod Koul <vkoul@kernel.org>
Tue, 17 Mar 2026 10:41:11 +0000 (16:11 +0530)
commit89a8567d84bde88cb7cdbbac2ab2299c4f991490
tree6f3cf78288734789de7791f37719e4448a30e4c6
parentabb863e6213dc41a58ef8bb3289b7e77460dabf3
dmaengine: sh: rz-dmac: Move CHCTRL updates under spinlock

Both rz_dmac_disable_hw() and rz_dmac_irq_handle_channel() update the
CHCTRL register. To avoid concurrency issues when configuring
functionalities exposed by this registers, take the virtual channel lock.
All other CHCTRL updates were already protected by the same lock.

Previously, rz_dmac_disable_hw() disabled and re-enabled local IRQs, before
accessing CHCTRL registers but this does not ensure race-free access.
Remove the local IRQ disable/enable code as well.

Fixes: 5000d37042a6 ("dmaengine: sh: Add DMAC driver for RZ/G2L SoC")
Cc: stable@vger.kernel.org
Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Link: https://patch.msgid.link/20260316133252.240348-3-claudiu.beznea.uj@bp.renesas.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/sh/rz-dmac.c