public inbox for dmaengine@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] dmaengine: dw-edma: Interrupt-emulation doorbell support
@ 2026-02-15 15:22 Koichiro Den
  2026-02-15 15:22 ` [PATCH 1/2] dmaengine: dw-edma: Add interrupt-emulation hooks Koichiro Den
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Koichiro Den @ 2026-02-15 15:22 UTC (permalink / raw)
  To: mani, vkoul, Frank.Li; +Cc: dmaengine, linux-kernel

Hi,

Some DesignWare eDMA instances support "interrupt emulation", where a
software write can assert the IRQ line without setting the normal
DONE/ABORT status bits.

In the current mainline, on implementations that support interrupt
emulation, writing once to DMA_{WRITE,READ}_INT_STATUS_OFF is sufficient
to leave the level-triggered IRQ line asserted. Since the shared dw-edma
IRQ handlers only look at DONE/ABORT bits and do not perform any
deassertion sequence for interrupt emulation, the IRQ remains asserted
and is eventually disabled by the generic IRQ layer:

  $ sudo devmem2 0xe65d50a0 w 0

  [   47.189557] irq 48: nobody cared (try booting with the "irqpoll" option)
  ...
  [   47.190383] handlers:
  [   47.199837] [<00000000a5ecb36e>] dw_edma_interrupt_common
  [   47.200214] Disabling IRQ #48

In other words, a single interrupt-emulation write can leave the IRQ
line stuck asserted and render the DMA engine unusable until reboot.

This series fixes the problem by:

  - adding a core hook to deassert an emulated interrupt
  - wiring a requestable Linux virtual IRQ whose .irq_ack performs the
    deassert sequence
  - raising that virtual IRQ from the dw-edma IRQ path to ensure the
    deassert sequence is always executed

This makes interrupt emulation safe and also enables platform users to
expose it as a doorbell via the exported db_irq and db_offset.

This is a spin-off from:
https://lore.kernel.org/linux-pci/20260209125316.2132589-1-den@valinux.co.jp/

Based on dmaengine.git next branch latest:
Commit ab736ed52e34 ("dmaengine: add Frank Li as reviewer")

Thanks for reviewing,


Koichiro Den (2):
  dmaengine: dw-edma: Add interrupt-emulation hooks
  dmaengine: dw-edma: Add virtual IRQ for interrupt-emulation doorbells

 drivers/dma/dw-edma/dw-edma-core.c    | 127 +++++++++++++++++++++++++-
 drivers/dma/dw-edma/dw-edma-core.h    |  17 ++++
 drivers/dma/dw-edma/dw-edma-v0-core.c |  21 +++++
 drivers/dma/dw-edma/dw-hdma-v0-core.c |   7 ++
 include/linux/dma/edma.h              |   6 ++
 5 files changed, 173 insertions(+), 5 deletions(-)

-- 
2.51.0


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-03-24  2:10 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-15 15:22 [PATCH 0/2] dmaengine: dw-edma: Interrupt-emulation doorbell support Koichiro Den
2026-02-15 15:22 ` [PATCH 1/2] dmaengine: dw-edma: Add interrupt-emulation hooks Koichiro Den
2026-02-16 16:38   ` Frank Li
2026-03-24  2:10   ` Koichiro Den
2026-02-15 15:22 ` [PATCH 2/2] dmaengine: dw-edma: Add virtual IRQ for interrupt-emulation doorbells Koichiro Den
2026-02-16 16:38   ` Frank Li
2026-02-18 16:19 ` [PATCH 0/2] dmaengine: dw-edma: Interrupt-emulation doorbell support Koichiro Den
2026-02-18 16:50   ` Niklas Cassel
2026-02-25 11:24 ` Vinod Koul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox