|
|
Log in / Subscribe / Register

PCI: endpoint: Expose endpoint DMA resources (part 2/3)

From:  Koichiro Den <den-AT-valinux.co.jp>
To:  Jingoo Han <jingoohan1-AT-gmail.com>, Manivannan Sadhasivam <mani-AT-kernel.org>, Lorenzo Pieralisi <lpieralisi-AT-kernel.org>, Krzysztof WilczyƄski <kwilczynski-AT-kernel.org>, Rob Herring <robh-AT-kernel.org>, Bjorn Helgaas <bhelgaas-AT-google.com>, Kishon Vijay Abraham I <kishon-AT-kernel.org>, Frank Li <Frank.Li-AT-kernel.org>, Niklas Cassel <cassel-AT-kernel.org>
Subject:  [PATCH v3 0/5] PCI: endpoint: Expose endpoint DMA resources (part 2/3)
Date:  Sun, 21 Jun 2026 02:04:33 +0900
Message-ID:  <20260620170438.3756593-1-den@valinux.co.jp>
Cc:  Marek Vasut <marek.vasut+renesas-AT-mailbox.org>, Yoshihiro Shimoda <yoshihiro.shimoda.uh-AT-renesas.com>, linux-kernel-AT-vger.kernel.org, linux-pci-AT-vger.kernel.org
Archive-link:  Article

Hi,

This is v3, 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 v3 00/13] dmaengine: dw-edma: Prepare for PCI EP DMA (part 1/3)
  https://lore.kernel.org/dmaengine/20260620170040.3756043-...

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

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)

v2: https://lore.kernel.org/linux-pci/20260525063129.3316894-...
v1: https://lore.kernel.org/linux-pci/20260521063405.2842644-...


Best regards,
Koichiro


Koichiro Den (5):
  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
  PCI: dwc: Implement endpoint DMA channel delegation

 MAINTAINERS                                   |   1 +
 .../pci/controller/dwc/pcie-designware-ep.c   | 192 +++++++++++++++++-
 drivers/pci/endpoint/pci-epc-core.c           | 100 +++++++++
 include/linux/pci-ep-dma.h                    | 163 +++++++++++++++
 include/linux/pci-epc.h                       |  61 ++++++
 5 files changed, 512 insertions(+), 5 deletions(-)
 create mode 100644 include/linux/pci-ep-dma.h

-- 
2.51.0




Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds