All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tadeusz Struk <tstruk@gmail.com>
To: Bjorn Helgaas <bhelgaas@google.com>
Cc: Logan Gunthorpe <logang@deltatee.com>,
	Jonathan Corbet <corbet@lwn.net>,
	Tadeusz Struk <tstruk@gmail.com>,
	linux-pci@vger.kernel.org, linux-doc@vger.kernel.org,
	stable@kernel.org, Tadeusz Struk <tstruk@gigaio.com>
Subject: [PATCH v2] Documentation: PCI/P2PDMA: Remove reference to pci_p2pdma_map_sg()
Date: Mon, 13 Nov 2023 19:03:25 +0100	[thread overview]
Message-ID: <20231113180325.444692-1-tstruk@gmail.com> (raw)
In-Reply-To: <6eb84bc5-dd58-4745-8e99-ccc97c10fb63@deltatee.com>

From: Tadeusz Struk <tstruk@gigaio.com>

Update Documentation/driver-api/pci/p2pdma.rst doc and
remove references to obsolete p2pdma mapping functions.

Fixes: 0d06132fc84b ("PCI/P2PDMA: Remove pci_p2pdma_[un]map_sg()")
Cc: stable <stable@kernel.org>
Signed-off-by: Tadeusz Struk <tstruk@gigaio.com>
----

v2: Dropped a section that talks about using is_pci_p2pdma_page()
    function by the client. Suggested by Logan.
---
 Documentation/driver-api/pci/p2pdma.rst | 16 +++-------------
 1 file changed, 3 insertions(+), 13 deletions(-)

diff --git a/Documentation/driver-api/pci/p2pdma.rst b/Documentation/driver-api/pci/p2pdma.rst
index 44deb52beeb4..44efed79d908 100644
--- a/Documentation/driver-api/pci/p2pdma.rst
+++ b/Documentation/driver-api/pci/p2pdma.rst
@@ -83,19 +83,9 @@ this to include other types of resources like doorbells.
 Client Drivers
 --------------
 
-A client driver typically only has to conditionally change its DMA map
-routine to use the mapping function :c:func:`pci_p2pdma_map_sg()` instead
-of the usual :c:func:`dma_map_sg()` function. Memory mapped in this
-way does not need to be unmapped.
-
-The client may also, optionally, make use of
-:c:func:`is_pci_p2pdma_page()` to determine when to use the P2P mapping
-functions and when to use the regular mapping functions. In some
-situations, it may be more appropriate to use a flag to indicate a
-given request is P2P memory and map appropriately. It is important to
-ensure that struct pages that back P2P memory stay out of code that
-does not have support for them as other code may treat the pages as
-regular memory which may not be appropriate.
+A client driver only has to use the mapping API :c:func:`dma_map_sg()`
+and :c:func:`dma_unmap_sg()` functions, as usual, and the implementaion
+will do the right thing for the P2P capable memory.
 
 
 Orchestrator Drivers
-- 
2.41.0


  reply	other threads:[~2023-11-13 18:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-11  9:22 [PATCH] Documentation: PCI/P2PDMA: Remove reference to pci_p2pdma_map_sg() Tadeusz Struk
2023-11-13 16:44 ` Logan Gunthorpe
2023-11-13 17:23   ` Tadeusz Struk
2023-11-13 17:43     ` Logan Gunthorpe
2023-11-13 18:03       ` Tadeusz Struk [this message]
2023-11-13 18:04         ` [PATCH v2] " Logan Gunthorpe
2023-11-20 22:07         ` Bjorn Helgaas

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=20231113180325.444692-1-tstruk@gmail.com \
    --to=tstruk@gmail.com \
    --cc=bhelgaas@google.com \
    --cc=corbet@lwn.net \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=logang@deltatee.com \
    --cc=stable@kernel.org \
    --cc=tstruk@gigaio.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.