diff mbox series

Documentation: PCI/P2PDMA: Remove reference to pci_p2pdma_map_sg()

Message ID 20231111092239.308767-1-tstruk@gmail.com (mailing list archive)
State Superseded
Headers show
Series Documentation: PCI/P2PDMA: Remove reference to pci_p2pdma_map_sg() | expand

Commit Message

Tadeusz Struk Nov. 11, 2023, 9:22 a.m. UTC
From: Tadeusz Struk <tstruk@gigaio.com>

Update Documentation/driver-api/pci/p2pdma.rst doc to
remove references to the obsolete pci_p2pdma_map_sg() function.

Fixes: 0d06132fc84b ("PCI/P2PDMA: Remove pci_p2pdma_[un]map_sg()")
Cc: stable <stable@kernel.org>
Signed-off-by: Tadeusz Struk <tstruk@gigaio.com>
---
 Documentation/driver-api/pci/p2pdma.rst | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

Comments

Logan Gunthorpe Nov. 13, 2023, 4:44 p.m. UTC | #1
On 2023-11-11 02:22, Tadeusz Struk wrote:
> From: Tadeusz Struk <tstruk@gigaio.com>
> 
> Update Documentation/driver-api/pci/p2pdma.rst doc to
> remove references to the obsolete pci_p2pdma_map_sg() function.
> 
> Fixes: 0d06132fc84b ("PCI/P2PDMA: Remove pci_p2pdma_[un]map_sg()")
> Cc: stable <stable@kernel.org>
> Signed-off-by: Tadeusz Struk <tstruk@gigaio.com>
> ---
>  Documentation/driver-api/pci/p2pdma.rst | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)


> diff --git a/Documentation/driver-api/pci/p2pdma.rst b/Documentation/driver-api/pci/p2pdma.rst
> index 44deb52beeb4..9e54ee711b5c 100644
> --- a/Documentation/driver-api/pci/p2pdma.rst
> +++ b/Documentation/driver-api/pci/p2pdma.rst
> @@ -83,10 +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.
> +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 implementation
> +will do the right thing for the P2P capable memory.
>  
>  The client may also, optionally, make use of
>  :c:func:`is_pci_p2pdma_page()` to determine when to use the P2P mapping

Might make sense to rework this next paragraph as well seeing it
references the P2P mapping functions that no longer exist.

Thanks for cleaning up the documentation I forgot about!

Logan
Tadeusz Struk Nov. 13, 2023, 5:23 p.m. UTC | #2
On 11/13/23 17:44, Logan Gunthorpe wrote:
> Might make sense to rework this next paragraph as well seeing it
> references the P2P mapping functions that no longer exist.
> 
> Thanks for cleaning up the documentation I forgot about!

Ok, I will need to check exactly what was removed when.
Currently I'm working with v6.1, and all the other functions are
still there in this version.
The pci_p2pdma_[un]map_sg() functions are gone since v6.0.
If you want to take this one, I will follow up with updates that
apply to more recent versions.

--
Thanks,
Tadeusz
Logan Gunthorpe Nov. 13, 2023, 5:43 p.m. UTC | #3
On 2023-11-13 10:23, Tadeusz Struk wrote:
> On 11/13/23 17:44, Logan Gunthorpe wrote:
>> Might make sense to rework this next paragraph as well seeing it
>> references the P2P mapping functions that no longer exist.
>>
>> Thanks for cleaning up the documentation I forgot about!
> 
> Ok, I will need to check exactly what was removed when.
> Currently I'm working with v6.1, and all the other functions are
> still there in this version.

The function still exists, but it's talking about using it to decide
when to use the map functions that are gone. Could probably just drop
the paragraph.

> The pci_p2pdma_[un]map_sg() functions are gone since v6.0.
> If you want to take this one, I will follow up with updates that
> apply to more recent versions.

Unfortunately I don't have the time at the moment to look at it.

Logan
diff mbox series

Patch

diff --git a/Documentation/driver-api/pci/p2pdma.rst b/Documentation/driver-api/pci/p2pdma.rst
index 44deb52beeb4..9e54ee711b5c 100644
--- a/Documentation/driver-api/pci/p2pdma.rst
+++ b/Documentation/driver-api/pci/p2pdma.rst
@@ -83,10 +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.
+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 implementation
+will do the right thing for the P2P capable memory.
 
 The client may also, optionally, make use of
 :c:func:`is_pci_p2pdma_page()` to determine when to use the P2P mapping