From: Randy Dunlap <rdunlap@infradead.org>
To: "Koichiro Den" <den@valinux.co.jp>,
"Manivannan Sadhasivam" <mani@kernel.org>,
"Krzysztof Wilczyński" <kwilczynski@kernel.org>,
"Kishon Vijay Abraham I" <kishon@kernel.org>,
"Bjorn Helgaas" <bhelgaas@google.com>,
"Jonathan Corbet" <corbet@lwn.net>,
"Shuah Khan" <skhan@linuxfoundation.org>,
"Vinod Koul" <vkoul@kernel.org>, "Frank Li" <Frank.Li@kernel.org>,
"Arnd Bergmann" <arnd@arndb.de>,
"Damien Le Moal" <dlemoal@kernel.org>,
"Niklas Cassel" <cassel@kernel.org>
Cc: Marek Vasut <marek.vasut+renesas@mailbox.org>,
Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>,
linux-pci@vger.kernel.org, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org, dmaengine@vger.kernel.org
Subject: Re: [PATCH v2 3/3] Documentation: PCI: Add PCI DMA endpoint function documentation
Date: Mon, 25 May 2026 11:05:05 -0700 [thread overview]
Message-ID: <98d30903-e456-4cb6-adaa-35b98ee7008b@infradead.org> (raw)
In-Reply-To: <20260525063456.3317509-4-den@valinux.co.jp>
Hi,
On 5/24/26 11:34 PM, Koichiro Den wrote:
> Add a function description and a user guide for pci-epf-dma. Describe
> the BAR-resident metadata consumed by dw-edma-pcie, the configfs
> attributes, endpoint controller requirements and the host-side DMAengine
> usage model.
>
> Signed-off-by: Koichiro Den <den@valinux.co.jp>
> ---
> Documentation/PCI/endpoint/index.rst | 2 +
> .../PCI/endpoint/pci-dma-function.rst | 182 ++++++++++++++++
> Documentation/PCI/endpoint/pci-dma-howto.rst | 200 ++++++++++++++++++
> 3 files changed, 384 insertions(+)
> create mode 100644 Documentation/PCI/endpoint/pci-dma-function.rst
> create mode 100644 Documentation/PCI/endpoint/pci-dma-howto.rst
> diff --git a/Documentation/PCI/endpoint/pci-dma-function.rst b/Documentation/PCI/endpoint/pci-dma-function.rst
> new file mode 100644
> index 000000000000..54caf4fafe00
> --- /dev/null
> +++ b/Documentation/PCI/endpoint/pci-dma-function.rst
> @@ -0,0 +1,182 @@
> +.. SPDX-License-Identifier: GPL-2.0
> +
> +================
> +PCI DMA Function
> +================
> +
> +:Author: Koichiro Den <den@valinux.co.jp>
> +
> +The PCI DMA endpoint function exposes an endpoint-integrated DMA controller
> +to the PCI host as a PCI DMA controller. A matching host-side driver
> +discovers the endpoint DMA metadata and registers the delegated channels with
> +the Linux DMAengine framework, so host DMAengine clients can submit
> +transfers.
> +
> +An endpoint Linux system can already use an endpoint-integrated DMA
> +controller locally through the normal DMAengine API, for example to transfer
> +data between endpoint memory and host addresses reachable over PCI. The PCI
> +DMA function provides a different ownership model: it delegates selected
> +local DMA channels to the host, so a host DMAengine client can request and
> +program those endpoint-side channels through the host's DMAengine API.
> +
> +To make that possible, the endpoint function publishes the DMA controller
> +register window and descriptor memory layout to the host, reserves the
> +selected local DMA channels on the endpoint side, and lets the host program
> +those channels directly.
> +
> +Constructs Used for Implementing DMA
> +====================================
> +
> +The PCI DMA function uses the following endpoint-side resources and
> +configuration:
> +
> + 1) DMA controller register window
> + 2) DMA descriptor memory for endpoint-to-RC channels
> + 3) DMA descriptor memory for RC-to-endpoint channels
> + 4) MSI or MSI-X interrupt vectors selected through configfs
> + 5) One endpoint BAR used to publish metadata
> + 6) If needed, one endpoint BAR used for dynamically mapped DMA windows
> +
> +The endpoint controller reports the DMA controller register and descriptor
> +resources through the endpoint auxiliary resource interface. The PCI DMA
> +function uses those descriptions to build the host-visible metadata and to map
> +resources that are not already visible to the host.
> +
Most of the headings/titles in these 2 documentation files don't use ':' at the
end of the headings. I suppose that we don't have any explicit docs guidelines
for that[*], but these (below) stand out as unusual to me (mostly due to the overall
inconsistency but also because headings just don't typically end with a colon
IME.
> +DMA Controller Register Window:
> +-------------------------------
> +
> +It contains the DMA controller registers programmed by the host-side driver
> +to submit transfers, control channels and handle DMA interrupts.
> +
> +DMA Descriptor Memory:
> +----------------------
> +
> +It contains the descriptor memory used by the DMA controller. The PCI DMA
> +function exposes descriptor memory for the delegated endpoint-to-RC and
> +RC-to-endpoint channels.
> +
> +MSI/MSI-X Interrupt Vectors:
> +----------------------------
> +
> +They are used by the delegated DMA channels to signal completion and error
> +conditions to the host-side driver.
> +
> +Metadata BAR:
> +-------------
> +
> +It is the endpoint BAR used to publish the endpoint DMA metadata and handshake
> +bits. The BAR remains stable while the endpoint function programs the DMA
> +windows.
> +
> +DMA Window BAR:
> +---------------
> +
> +It is the endpoint BAR used for DMA resources that are not already visible
> +through a fixed BAR. The endpoint function may switch this BAR to subrange
> +mapping after the host-side driver has found the metadata BAR.
*: other than Documentation/doc-guide/sphinx.rst, where heading styles are listed
without colons.
--
~Randy
next prev parent reply other threads:[~2026-05-25 18:05 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-25 6:34 [PATCH v2 0/3] PCI: endpoint: Add PCI DMA endpoint function (part 3/3) Koichiro Den
2026-05-25 6:34 ` [PATCH v2 1/3] dmaengine: dw-edma-pcie: Discover endpoint DMA metadata Koichiro Den
2026-05-25 6:34 ` [PATCH v2 2/3] PCI: endpoint: Add DMA endpoint function Koichiro Den
2026-05-25 6:34 ` [PATCH v2 3/3] Documentation: PCI: Add PCI DMA endpoint function documentation Koichiro Den
2026-05-25 18:05 ` Randy Dunlap [this message]
2026-05-26 2:18 ` Koichiro Den
2026-05-25 7:05 ` [PATCH v2 0/3] PCI: endpoint: Add PCI DMA endpoint function (part 3/3) Koichiro Den
2026-05-25 8:35 ` Niklas Cassel
2026-05-25 14:03 ` Koichiro Den
2026-05-25 20:32 ` Niklas Cassel
2026-05-26 2:04 ` Koichiro Den
2026-05-26 5:35 ` Niklas Cassel
2026-05-26 6:23 ` Koichiro Den
2026-05-26 8:28 ` Niklas Cassel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=98d30903-e456-4cb6-adaa-35b98ee7008b@infradead.org \
--to=rdunlap@infradead.org \
--cc=Frank.Li@kernel.org \
--cc=arnd@arndb.de \
--cc=bhelgaas@google.com \
--cc=cassel@kernel.org \
--cc=corbet@lwn.net \
--cc=den@valinux.co.jp \
--cc=dlemoal@kernel.org \
--cc=dmaengine@vger.kernel.org \
--cc=kishon@kernel.org \
--cc=kwilczynski@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=mani@kernel.org \
--cc=marek.vasut+renesas@mailbox.org \
--cc=skhan@linuxfoundation.org \
--cc=vkoul@kernel.org \
--cc=yoshihiro.shimoda.uh@renesas.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®