diff options
author | Logan Gunthorpe <logang@deltatee.com> | 2022-07-08 19:50:52 +0300 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2022-07-26 14:27:47 +0300 |
commit | 42399301203e3cddef36cde457228f9247618313 (patch) | |
tree | 9399ebc6645f744b5ea652d953049640b2bd04af /drivers/pci/Kconfig | |
parent | 72311809031217714e635b24f8478e6ecb0d93d9 (diff) | |
download | linux-42399301203e3cddef36cde457228f9247618313.tar.xz |
lib/scatterlist: add flag for indicating P2PDMA segments in an SGL
Introduce a dma_flags field in struct scatterlist. These flags 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.
The dma_flags field will fit in the existing padding on 64BIT systems
(assuming CONFIG_NEED_SG_DMA_LENGTH is also set).
The new bit will only be used when CONFIG_PCI_P2PDMA is set; 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>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/pci/Kconfig')
-rw-r--r-- | drivers/pci/Kconfig | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/pci/Kconfig b/drivers/pci/Kconfig index 133c73207782..5cc7cba1941f 100644 --- a/drivers/pci/Kconfig +++ b/drivers/pci/Kconfig @@ -164,6 +164,11 @@ config PCI_PASID config PCI_P2PDMA bool "PCI peer-to-peer transfer support" depends on ZONE_DEVICE + # + # The need for the scatterlist DMA bus address flag means PCI P2PDMA + # requires 64bit + # + depends on 64BIT select GENERIC_ALLOCATOR help Enableѕ drivers to do PCI peer-to-peer transactions to and from |