[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260204145440.950609-1-den@valinux.co.jp>
Date: Wed, 4 Feb 2026 23:54:28 +0900
From: Koichiro Den <den@...inux.co.jp>
To: vkoul@...nel.org,
mani@...nel.org,
Frank.Li@....com,
jingoohan1@...il.com,
lpieralisi@...nel.org,
kwilczynski@...nel.org,
robh@...nel.org,
bhelgaas@...gle.com
Cc: dmaengine@...r.kernel.org,
linux-pci@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH v3 00/11] dmaengine, PCI: endpoint: Enable remote use of integrated DesignWare eDMA
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
Powered by blists - more mailing lists