Linux PCI subsystem development
 help / color / mirror / Atom feed
* [PATCH v4 0/6] PCI: endpoint: Expose endpoint DMA resources (part 2/3)
@ 2026-07-10  8:21 Koichiro Den
  2026-07-10  8:21 ` [PATCH v4 1/6] PCI: endpoint: Define endpoint DMA BAR metadata format Koichiro Den
                   ` (5 more replies)
  0 siblings, 6 replies; 13+ messages in thread
From: Koichiro Den @ 2026-07-10  8:21 UTC (permalink / raw)
  To: Manivannan Sadhasivam, Vinod Koul, Frank Li, Jingoo Han,
	Lorenzo Pieralisi, Krzysztof Wilczyński, Rob Herring,
	Bjorn Helgaas, Kishon Vijay Abraham I
  Cc: Marek Vasut, Yoshihiro Shimoda, linux-kernel, dmaengine,
	linux-pci

Hi,

This is v4, part 2 of three series for PCI endpoint DMA.

The three series are:

  * part 1: dmaengine: dw-edma: Prepare for PCI EP DMA
  * part 2: PCI: endpoint: Expose endpoint DMA resources
  * part 3: PCI: endpoint: Add PCI DMA endpoint function

This series adds the PCI endpoint-side pieces used by the endpoint DMA
function. It defines the BAR metadata format, extends EPC auxiliary
resources with DMA-specific resource descriptions, adds EPC operations to
delegate and reclaim DMA channels, and teaches the DesignWare endpoint
controller to publish and delegate its integrated DMA resources.

The metadata lives in a normal endpoint BAR, not in PCI config space. This
keeps discovery independent from controller-specific writable extended
capability storage.

Dependencies
============

This series depends on part 1:

  [PATCH v4 00/14] dmaengine: dw-edma: Prepare for PCI EP DMA (part 1/3)
  https://lore.kernel.org/dmaengine/20260710081518.2394357-1-den@valinux.co.jp/

---
Changelog
=========

Changes in v4:
  - Rebased onto the new part 1 series.
  - "dmaengine: dw-edma: Add delegated channel request helpers" moved
    from part 1 into this series, next to its only users; this also
    resolves the undeclared-functions issue reported against v3 5/5.
    (Sashiko)
  - Lift the v3 PF0-only restriction on DMA resource exposure and
    channel delegation: part 1 now programs the per-channel requester
    function number. Delegation to PF1+ therefore requires part 1
    applied on the host side.
  - Move pci_epc_function_is_valid() up to avoid a potential error
    pointer dereference. (Sashiko)

Changes in v3:
  - Decouple logical DMA channel metadata from descriptor memory resources.
    Logical channels now refer to descriptor memory by resource ID instead
    of embedding descriptor metadata in each channel resource. (Sashiko)
  - Replace the v2 DMAengine filter-callback metadata with EPC-level DMA
    channel delegation/reclaim operations, keeping DMAengine provider
    details
    out of generic EPC resource metadata.
  - Add the DesignWare EPC backend for DMA channel delegation.
  - Limit DesignWare endpoint DMA resource exposure to linked-list channels
    until non-LL metadata and host-side parsing are added.
  - Suppress DesignWare DMA auxiliary resources when the local DW eDMA
    provider is not available.
  - Reject VF DMA resource and delegation requests because the DWC
    eDMA/HDMA register window exposed to the Root Complex is PF-only.

Changes in v2:
  - Follow the part 1/3 v2 channel-claim model: EPC DMA resources now
    carry DMAengine filter information instead of raw DMA channel
    pointers. (Sashiko)
  - Update the DesignWare endpoint resource provider accordingly. (Sashiko)

v3: https://lore.kernel.org/linux-pci/20260620170438.3756593-1-den@valinux.co.jp/
v2: https://lore.kernel.org/linux-pci/20260525063129.3316894-1-den@valinux.co.jp/
v1: https://lore.kernel.org/linux-pci/20260521063405.2842644-1-den@valinux.co.jp/

Best regards,
Koichiro


Koichiro Den (6):
  PCI: endpoint: Define endpoint DMA BAR metadata format
  PCI: endpoint: Add DMA auxiliary resource metadata
  PCI: endpoint: Add API to delegate EPC DMA channels to the host
  PCI: dwc: Expose endpoint DMA resources
  dmaengine: dw-edma: Add delegated channel request helpers
  PCI: dwc: Implement endpoint DMA channel delegation

 MAINTAINERS                                   |   1 +
 drivers/dma/dw-edma/dw-edma-core.c            |  86 ++++++++
 .../pci/controller/dwc/pcie-designware-ep.c   | 186 +++++++++++++++++-
 drivers/pci/endpoint/pci-epc-core.c           | 102 ++++++++++
 include/linux/dma/edma.h                      |  14 ++
 include/linux/pci-ep-dma.h                    | 170 ++++++++++++++++
 include/linux/pci-epc.h                       |  61 ++++++
 7 files changed, 616 insertions(+), 4 deletions(-)
 create mode 100644 include/linux/pci-ep-dma.h

-- 
2.51.0


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

end of thread, other threads:[~2026-07-10 10:43 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-10  8:21 [PATCH v4 0/6] PCI: endpoint: Expose endpoint DMA resources (part 2/3) Koichiro Den
2026-07-10  8:21 ` [PATCH v4 1/6] PCI: endpoint: Define endpoint DMA BAR metadata format Koichiro Den
2026-07-10  8:24   ` sashiko-bot
2026-07-10  8:21 ` [PATCH v4 2/6] PCI: endpoint: Add DMA auxiliary resource metadata Koichiro Den
2026-07-10  8:27   ` sashiko-bot
2026-07-10  8:21 ` [PATCH v4 3/6] PCI: endpoint: Add API to delegate EPC DMA channels to the host Koichiro Den
2026-07-10  8:32   ` sashiko-bot
2026-07-10  8:21 ` [PATCH v4 4/6] PCI: dwc: Expose endpoint DMA resources Koichiro Den
2026-07-10  8:29   ` sashiko-bot
2026-07-10  8:21 ` [PATCH v4 5/6] dmaengine: dw-edma: Add delegated channel request helpers Koichiro Den
2026-07-10 10:43   ` sashiko-bot
2026-07-10  8:21 ` [PATCH v4 6/6] PCI: dwc: Implement endpoint DMA channel delegation Koichiro Den
2026-07-10  8:30   ` sashiko-bot

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