linux/drivers/dma/dw-edma
Frank Li 8ffba0171c dmaengine: dw-edma: Add spinlock to protect DONE_INT_MASK and ABORT_INT_MASK
The DONE_INT_MASK and ABORT_INT_MASK registers are shared by all DMA
channels, and modifying them requires a read-modify-write sequence.
Because this operation is not atomic, concurrent calls to
dw_edma_v0_core_start() can introduce race conditions if two channels
update these registers simultaneously.

Add a spinlock to serialize access to these registers and prevent race
conditions.

Fixes: 7e4b8a4fbe ("dmaengine: Add Synopsys eDMA IP version 0 support")
Cc: stable@vger.kernel.org
Signed-off-by: Frank Li <Frank.Li@nxp.com>
[den: update dw_edma.lock comment]
Link: https://lore.kernel.org/dmaengine/20260109-edma_ll-v2-1-5c0b27b2c664@nxp.com/
Signed-off-by: Koichiro Den <den@valinux.co.jp>
Link: https://patch.msgid.link/20260521142153.2957432-5-den@valinux.co.jp
Signed-off-by: Vinod Koul <vkoul@kernel.org>
2026-06-08 17:02:21 +05:30
..
dw-edma-core.c dmaengine: dw-edma: Remove dw_edma_add_irq_mask() 2026-06-08 17:02:21 +05:30
dw-edma-core.h dmaengine: dw-edma: Add spinlock to protect DONE_INT_MASK and ABORT_INT_MASK 2026-06-08 17:02:21 +05:30
dw-edma-pcie.c dmaengine: dw-edma-pcie: Reject devices without driver data 2026-06-08 17:02:21 +05:30
dw-edma-v0-core.c dmaengine: dw-edma: Add spinlock to protect DONE_INT_MASK and ABORT_INT_MASK 2026-06-08 17:02:21 +05:30
dw-edma-v0-core.h dmaengine: dw-edma: Create a new dw_edma_core_ops structure to abstract controller operation 2023-05-24 12:20:45 +05:30
dw-edma-v0-debugfs.c dmaengine: dw-edma: increase size of 'name' in debugfs code 2024-01-19 18:17:34 +05:30
dw-edma-v0-debugfs.h dmaengine: dw-edma: Use DMA engine device debugfs subdirectory 2023-02-10 17:15:23 -06:00
dw-edma-v0-regs.h dmaengine: dw-edma: Fix comments offset characters' alignment 2021-03-16 22:58:52 +05:30
dw-hdma-v0-core.c dmaengine: dw-edma: Add non-LL mode 2026-03-18 15:11:40 +05:30
dw-hdma-v0-core.h dmaengine: dw-edma: Add support for native HDMA 2023-05-24 12:20:45 +05:30
dw-hdma-v0-debugfs.c dmaengine: dw-edma: increase size of 'name' in debugfs code 2024-01-19 18:17:34 +05:30
dw-hdma-v0-debugfs.h dmaengine: dw-edma: Add HDMA DebugFS support 2023-05-24 12:20:45 +05:30
dw-hdma-v0-regs.h dmaengine: dw-edma: Add non-LL mode 2026-03-18 15:11:40 +05:30
Kconfig dmaengine: dw-edma: Depend on DW_EDMA instead of selecting it 2023-02-22 13:46:04 -06:00
Makefile dmaengine: dw-edma: Add HDMA DebugFS support 2023-05-24 12:20:45 +05:30