Thread (99 messages) 99 messages, 6 authors, 2021-05-11

Re: [PATCH 09/16] dma-direct: Support PCI P2PDMA pages in dma-direct map_sg

From: John Hubbard <jhubbard@nvidia.com>
Date: 2021-05-02 23:32:55
Also in: linux-iommu, linux-mm, linux-nvme, linux-pci, lkml

On 5/2/21 4:28 PM, John Hubbard wrote:
On 4/8/21 10:01 AM, Logan Gunthorpe wrote:
...
quoted
@@ -387,19 +388,37 @@ void dma_direct_unmap_sg(struct device *dev, struct scatterlist *sgl,
This routine now deserves a little bit of commenting, now that it is
doing less obvious things. How about something like this:

/*
* Unmaps pages, except for PCI_P2PDMA pages, which were never mapped in the
* first place. Instead of unmapping PCI_P2PDMA entries, simply remove the
* SG_PCI_P2PDMA mark
*/
I got that kind of wrong. They *were* mapped, but need to be left mostly
alone...maybe you can word it better. Here's my second draft:

/*
  * Unmaps pages, except for PCI_P2PDMA pages, which should not be unmapped at
  * this point. Instead of unmapping PCI_P2PDMA entries, simply remove the
  * SG_PCI_P2PDMA mark.
  */

...am I getting close? :)

thanks,
-- 
John Hubbard
NVIDIA
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help