From: Bjorn Helgaas <helgaas@kernel.org>
To: Christoph Hellwig <hch@lst.de>
Cc: christophe.jaillet@wanadoo.fr, linux-pci@vger.kernel.org
Subject: Re: [PATCH] PCI/doc: cleanup references to the legacy PCI DMA API
Date: Wed, 30 Mar 2022 06:02:45 -0500 [thread overview]
Message-ID: <20220330110245.GA1680763@bhelgaas> (raw)
In-Reply-To: <20220330052556.2566388-1-hch@lst.de>
On Wed, Mar 30, 2022 at 07:25:56AM +0200, Christoph Hellwig wrote:
> Mention the regular DMA API calls instead of the now removed PCI DMA API.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Thanks!
> ---
>
> I'd plan to queue this up ASAP together with the pci-dma-compat.h
> removal.
>
> Documentation/PCI/pci.rst | 14 +++++++-------
> 1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/Documentation/PCI/pci.rst b/Documentation/PCI/pci.rst
> index 87c6f4a6ca32b..67a850b556173 100644
> --- a/Documentation/PCI/pci.rst
> +++ b/Documentation/PCI/pci.rst
> @@ -278,20 +278,20 @@ appropriate parameters. In general this allows more efficient DMA
> on systems where System RAM exists above 4G _physical_ address.
>
> Drivers for all PCI-X and PCIe compliant devices must call
> -pci_set_dma_mask() as they are 64-bit DMA devices.
> +set_dma_mask() as they are 64-bit DMA devices.
>
> Similarly, drivers must also "register" this capability if the device
> -can directly address "consistent memory" in System RAM above 4G physical
> -address by calling pci_set_consistent_dma_mask().
> +can directly address "coherent memory" in System RAM above 4G physical
> +address by calling dma_set_coherent_mask().
> Again, this includes drivers for all PCI-X and PCIe compliant devices.
> Many 64-bit "PCI" devices (before PCI-X) and some PCI-X devices are
> 64-bit DMA capable for payload ("streaming") data but not control
> -("consistent") data.
> +("coherent") data.
>
>
> Setup shared control data
> -------------------------
> -Once the DMA masks are set, the driver can allocate "consistent" (a.k.a. shared)
> +Once the DMA masks are set, the driver can allocate "coherent" (a.k.a. shared)
> memory. See Documentation/core-api/dma-api.rst for a full description of
> the DMA APIs. This section is just a reminder that it needs to be done
> before enabling DMA on the device.
> @@ -367,7 +367,7 @@ steps need to be performed:
> - Disable the device from generating IRQs
> - Release the IRQ (free_irq())
> - Stop all DMA activity
> - - Release DMA buffers (both streaming and consistent)
> + - Release DMA buffers (both streaming and coherent)
> - Unregister from other subsystems (e.g. scsi or netdev)
> - Disable device from responding to MMIO/IO Port addresses
> - Release MMIO/IO Port resource(s)
> @@ -420,7 +420,7 @@ Once DMA is stopped, clean up streaming DMA first.
> I.e. unmap data buffers and return buffers to "upstream"
> owners if there is one.
>
> -Then clean up "consistent" buffers which contain the control data.
> +Then clean up "coherent" buffers which contain the control data.
>
> See Documentation/core-api/dma-api.rst for details on unmapping interfaces.
>
> --
> 2.30.2
>
prev parent reply other threads:[~2022-03-30 11:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-30 5:25 [PATCH] PCI/doc: cleanup references to the legacy PCI DMA API Christoph Hellwig
2022-03-30 11:02 ` Bjorn Helgaas [this message]
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=20220330110245.GA1680763@bhelgaas \
--to=helgaas@kernel.org \
--cc=christophe.jaillet@wanadoo.fr \
--cc=hch@lst.de \
--cc=linux-pci@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).