Thread (40 messages) 40 messages, 3 authors, 2021-12-22

Re: [PATCH v4 02/23] lib/scatterlist: add flag for indicating P2PDMA segments in an SGL

From: Chaitanya Kulkarni <hidden>
Date: 2021-12-13 21:55:15
Also in: linux-block, linux-iommu, linux-mm, linux-nvme, lkml

On 11/17/21 1:53 PM, Logan Gunthorpe wrote:
Make use of the third free LSB in scatterlist's page_link on 64bit systems.

The extra bit will be used by dma_[un]map_sg_p2pdma() to determine when a
given SGL segments dma_address points to a PCI bus address.
dma_unmap_sg_p2pdma() will need to perform different cleanup when a
segment is marked as a bus address.

Create a CONFIG_NEED_SG_DMA_BUS_ADDR_FLAG bool which depends on
CONFIG_64BIT (so there is space in the page link for the new flag).
CONFIG_PCI_P2PDMA will then depend on this so this means PCI P2PDMA will
require CONFIG_64BIT. This should be acceptable as the majority of P2PDMA
use cases are restricted to newer root complexes and roughly require the
extra address space for memory BARs used in the transactions.

Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
Looks good.

Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help