public inbox for dmaengine@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 00/11] dmaengine, PCI: endpoint: Enable remote use of integrated DesignWare eDMA
@ 2026-02-04 14:54 Koichiro Den
  2026-02-04 14:54 ` [PATCH v3 01/11] dmaengine: Add hw_id to dma_slave_caps Koichiro Den
                   ` (10 more replies)
  0 siblings, 11 replies; 32+ messages in thread
From: Koichiro Den @ 2026-02-04 14:54 UTC (permalink / raw)
  To: vkoul, mani, Frank.Li, jingoohan1, lpieralisi, kwilczynski, robh,
	bhelgaas
  Cc: dmaengine, linux-pci, linux-kernel

Hi,

Some DesignWare PCIe endpoint platforms integrate a DesignWare eDMA
instance alongside the PCIe controller. In remote eDMA use cases, the
host needs access to the eDMA register block and the per-channel
linked-list (LL) regions via PCIe BARs, while the endpoint may still
boot with a standard EP configuration (and may also use dw-edma
locally).

This series provides the following building blocks:

  * dmaengine:

    1. Add dma_slave_caps.hw_id and report it from dw-edma so clients can
       correlate a dma_chan obtained via dma_request_channel() with
       hardware-specific resources (e.g. per-channel LL regions) returned
       by pci_epc_get_remote_resources().
       => Patch 01/11 - 02/11

    2. Add dw-edma-specific per-channel interrupt routing control via
       dma_slave_config.peripheral_config.
       => Patch 03/11

    3. Add dmaengine_(un)register_selfirq() API, and implement it for
       dw-edma. For dw-edma, a write to WR/RD_DONE_INT_STATUS can raise an
       interrupt without setting DONE/ABORT status bits, and dw-edma uses
       this behaviour.
       => Patch 04/11 - 05/11

  * pci/endpoint:

    1. Add a generic remote resource enumeration API
       (pci_epc_get_remote_resources()) for EPF drivers to discover
       controller-owned resources that can be mapped into BAR space (e.g.
       an integrated DMA MMIO window and per-channel LL regions). Implement
       it for dwc.
       => Patch 06/11 - 08/11

    2. Add a smoke test for the new EPC API.
       => Patch 09/11 - 11/11

This series evolved out of:
https://lore.kernel.org/linux-pci/20260118135440.1958279-1-den@valinux.co.jp/


Kernel base
===========

Patches 1-5 cleanly apply to dmaengine.git 'next':
Commit 3c8a86ed002a ("dmaengine: xilinx: xdma: use sg_nents_for_dma() helper")

Patches 6-11 cleanly apply to pci.git 'controller/dwc':
Commit e3c3a5d25dc0 ("PCI: dwc: ep: Add comment explaining controller level PTM access in multi PF setup")

If preferred, I can split the series into two.

Changelog
=========

* v2->v3 changes:
  - Replace DWC-specific helpers with a generic EPC remote resource query API.
  - Add pci-epf-test smoke test and host/kselftest support for the new API.
  - Drop the dw-edma-specific notify-only channel and polling approach
    ([PATCH v2 4/7] and [PATCH v2 5/7]), and rework notification handling
    around a generic dmaengine_(un)register_selfirq() API implemented
    by dw-edma.

* v1->v2 changes:
  - Combine the two previously posted series into a single set (per Frank's
    suggestion). Order dmaengine/dw-edma patches first so hw_id support
    lands before the PCI LL-region helper, which assumes
    dma_slave_caps.hw_id availability.

v2: https://lore.kernel.org/all/20260127033420.3460579-1-den@valinux.co.jp/
v1: https://lore.kernel.org/dmaengine/20260126073652.3293564-1-den@valinux.co.jp/
    +
    https://lore.kernel.org/linux-pci/20260126071550.3233631-1-den@valinux.co.jp/

Thanks for reviewing,


Koichiro Den (11):
  dmaengine: Add hw_id to dma_slave_caps
  dmaengine: dw-edma: Report channel hw_id in dma_slave_caps
  dmaengine: dw-edma: Add per-channel interrupt routing control
  dmaengine: Add selfirq callback registration API
  dmaengine: dw-edma: Implement dmaengine selfirq callbacks using
    interrupt emulation
  PCI: endpoint: Add remote resource query API
  PCI: dwc: Record integrated eDMA register window
  PCI: dwc: ep: Report integrated DWC eDMA remote resources
  PCI: endpoint: pci-epf-test: Add smoke test for EPC remote resource
    API
  misc: pci_endpoint_test: Add EPC remote resource API test ioctl
  selftests: pci_endpoint: Add EPC remote resource API test

 drivers/dma/dmaengine.c                       |   1 +
 drivers/dma/dw-edma/dw-edma-core.c            | 143 +++++++++++++++++-
 drivers/dma/dw-edma/dw-edma-core.h            |  30 ++++
 drivers/dma/dw-edma/dw-edma-v0-core.c         |  37 ++++-
 drivers/misc/pci_endpoint_test.c              |  49 ++++++
 .../pci/controller/dwc/pcie-designware-ep.c   |  74 +++++++++
 drivers/pci/controller/dwc/pcie-designware.c  |   4 +
 drivers/pci/controller/dwc/pcie-designware.h  |   2 +
 drivers/pci/endpoint/functions/pci-epf-test.c |  88 +++++++++++
 drivers/pci/endpoint/pci-epc-core.c           |  41 +++++
 include/linux/dma/edma.h                      |  28 ++++
 include/linux/dmaengine.h                     |  72 +++++++++
 include/linux/pci-epc.h                       |  46 ++++++
 include/uapi/linux/pcitest.h                  |   1 +
 .../pci_endpoint/pci_endpoint_test.c          |  28 ++++
 15 files changed, 631 insertions(+), 13 deletions(-)

-- 
2.51.0


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

end of thread, other threads:[~2026-02-05 16:11 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-04 14:54 [PATCH v3 00/11] dmaengine, PCI: endpoint: Enable remote use of integrated DesignWare eDMA Koichiro Den
2026-02-04 14:54 ` [PATCH v3 01/11] dmaengine: Add hw_id to dma_slave_caps Koichiro Den
2026-02-04 19:39   ` Frank Li
2026-02-05  6:46     ` Koichiro Den
2026-02-05 16:04       ` Frank Li
2026-02-04 14:54 ` [PATCH v3 02/11] dmaengine: dw-edma: Report channel hw_id in dma_slave_caps Koichiro Den
2026-02-04 14:54 ` [PATCH v3 03/11] dmaengine: dw-edma: Add per-channel interrupt routing control Koichiro Den
2026-02-04 17:42   ` Frank Li
2026-02-05  6:48     ` Koichiro Den
2026-02-05 16:05       ` Frank Li
2026-02-04 14:54 ` [PATCH v3 04/11] dmaengine: Add selfirq callback registration API Koichiro Den
2026-02-04 17:46   ` Frank Li
2026-02-05  6:50     ` Koichiro Den
2026-02-05 16:07       ` Frank Li
2026-02-04 14:54 ` [PATCH v3 05/11] dmaengine: dw-edma: Implement dmaengine selfirq callbacks using interrupt emulation Koichiro Den
2026-02-04 14:54 ` [PATCH v3 06/11] PCI: endpoint: Add remote resource query API Koichiro Den
2026-02-04 17:55   ` Frank Li
2026-02-05  6:53     ` Koichiro Den
2026-02-05 16:10       ` Frank Li
2026-02-04 14:54 ` [PATCH v3 07/11] PCI: dwc: Record integrated eDMA register window Koichiro Den
2026-02-04 17:57   ` Frank Li
2026-02-04 14:54 ` [PATCH v3 08/11] PCI: dwc: ep: Report integrated DWC eDMA remote resources Koichiro Den
2026-02-04 18:06   ` Frank Li
2026-02-05  6:58     ` Koichiro Den
2026-02-05 16:11       ` Frank Li
2026-02-04 14:54 ` [PATCH v3 09/11] PCI: endpoint: pci-epf-test: Add smoke test for EPC remote resource API Koichiro Den
2026-02-04 19:37   ` Frank Li
2026-02-05  7:01     ` Koichiro Den
2026-02-05  0:01   ` kernel test robot
2026-02-05  2:37   ` kernel test robot
2026-02-04 14:54 ` [PATCH v3 10/11] misc: pci_endpoint_test: Add EPC remote resource API test ioctl Koichiro Den
2026-02-04 14:54 ` [PATCH v3 11/11] selftests: pci_endpoint: Add EPC remote resource API test Koichiro Den

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