The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH 0/7] dmaengine: dw-edma: Fixes and interrupt-path groundwork
@ 2026-07-10  8:08 Koichiro Den
  2026-07-10  8:08 ` [PATCH 1/7] dmaengine: dw-edma: Fix HDMA channel status register access Koichiro Den
                   ` (6 more replies)
  0 siblings, 7 replies; 14+ messages in thread
From: Koichiro Den @ 2026-07-10  8:08 UTC (permalink / raw)
  To: Manivannan Sadhasivam, Vinod Koul, Frank Li, Cai Huoqing,
	Serge Semin, Gustavo Pimentel
  Cc: Devendra K Verma, dmaengine, linux-kernel

Hi,

This series collects fixes and interrupt-path groundwork for dw-edma,
mostly split out of v1 of the "Support dynamic LL appends" series:

  [PATCH 00/17] dmaengine: dw-edma: Support dynamic LL appends
  https://lore.kernel.org/dmaengine/20260615154111.2174161-1-den@valinux.co.jp/

That series had grown too large to review as one unit. Patches 1-4 are
what remains of v1's patches 01-05, slightly reordered but unchanged
in substance: Frank picked up v1's patch 01 (the residue fix) into
edma_ll v5,

  https://lore.kernel.org/dmaengine/20260709-edma_ll-v5-10-e199053d4300@nxp.com/

so it is no longer carried here. Patches 5-7 are new. None of them
depend on the dynamic-append work, and they are worth having on their
own.

Patches 1-4 are fixes.

- Patch 1 fixes a swapped argument order in the HDMA channel status
  register access (Cc: stable). v1 deferred this to a similar fix
  expected from Devendra, which has not appeared so far. Patch 1
  applies directly to mainline and can be picked independently.
- Patch 2 stops invoking completion callbacks for STOP-terminated
  descriptors.
- Patch 3 fixes vchan descriptor bookkeeping on termination.
- Patch 4 serializes channel state checks in pause/resume/terminate
  (carries Frank's Reviewed-by from the v1 thread).

Patch 5 drops a redundant remove-time pci_free_irq_vectors(): the device
is managed by pcim_enable_device(), so the vectors are released on
device release.

Patch 6 reads the shared DONE/ABORT interrupt status register once per
v0 handler pass. On remote setups every register read is a non-posted
round trip across the PCIe link, so the redundant reads cost real
latency in the hot path.

Patch 7 moves per-channel interrupt handling out of hard IRQ context
into per-channel work items on a dedicated WQ_UNBOUND | WQ_HIGHPRI
workqueue. On SoCs like R-Car S4 the endpoint-side eDMA raises a single
fixed SPI hardwired to CPU0 for all read and write channels; handling
every channel event in that hard IRQ serializes completion processing on
one CPU and turns vc.lock contention into system-wide interrupt latency.

Based on v7.2-rc1 (dmaengine/master).

To maintainers/reviewers:
- Sashiko's pre-existing-issue report on Frank's edma_ll v5 thread
  (lockless pause/resume/terminate_all racing the virt-dma lists,
  https://lore.kernel.org/dmaengine/20260709154606.734B31F00A3A@smtp.kernel.org/)
  is addressed by patch 4 of this series.
- This series textually conflicts with Frank's edma_ll v5 in the v0
  interrupt handler and the termination paths, but the conflicts are
  small. It has been tested with edma_ll v5 applied on top, on an R-Car
  S4 endpoint/host pair, and I am happy to rebase either way if
  preferred.
- The "Support dynamic LL appends" v2 and a follow-up v0 engine
  recovery series will follow shortly. They build on top of this
  series plus whichever revision of Frank's edma_ll lands.

Best regards,
Koichiro


Koichiro Den (7):
  dmaengine: dw-edma: Fix HDMA channel status register access
  dmaengine: dw-edma: Terminate STOP requests without callbacks
  dmaengine: dw-edma: Clean up vchan descriptors on termination
  dmaengine: dw-edma: Serialize channel state checks
  dmaengine: dw-edma-pcie: Drop redundant pci_free_irq_vectors()
  dmaengine: dw-edma: Snapshot the v0 interrupt status once per handler
    pass
  dmaengine: dw-edma: Defer channel IRQ handling to workqueue

 drivers/dma/dw-edma/dw-edma-core.c    | 170 +++++++++++++++++++++++---
 drivers/dma/dw-edma/dw-edma-core.h    |  12 ++
 drivers/dma/dw-edma/dw-edma-pcie.c    |   3 -
 drivers/dma/dw-edma/dw-edma-v0-core.c |  28 ++---
 drivers/dma/dw-edma/dw-hdma-v0-core.c |   2 +-
 5 files changed, 177 insertions(+), 38 deletions(-)

-- 
2.51.0


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

end of thread, other threads:[~2026-07-11 14:55 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-10  8:08 [PATCH 0/7] dmaengine: dw-edma: Fixes and interrupt-path groundwork Koichiro Den
2026-07-10  8:08 ` [PATCH 1/7] dmaengine: dw-edma: Fix HDMA channel status register access Koichiro Den
2026-07-10 21:26   ` Frank Li
2026-07-10  8:08 ` [PATCH 2/7] dmaengine: dw-edma: Terminate STOP requests without callbacks Koichiro Den
2026-07-11 14:27   ` Frank Li
2026-07-10  8:08 ` [PATCH 3/7] dmaengine: dw-edma: Clean up vchan descriptors on termination Koichiro Den
2026-07-11 14:39   ` Frank Li
2026-07-10  8:09 ` [PATCH 4/7] dmaengine: dw-edma: Serialize channel state checks Koichiro Den
2026-07-10  8:09 ` [PATCH 5/7] dmaengine: dw-edma-pcie: Drop redundant pci_free_irq_vectors() Koichiro Den
2026-07-11 14:41   ` Frank Li
2026-07-10  8:09 ` [PATCH 6/7] dmaengine: dw-edma: Snapshot the v0 interrupt status once per handler pass Koichiro Den
2026-07-11 14:44   ` Frank Li
2026-07-10  8:09 ` [PATCH 7/7] dmaengine: dw-edma: Defer channel IRQ handling to workqueue Koichiro Den
2026-07-11 14:55   ` Frank Li

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