[PATCH v9 02/24] dma-mapping: move the PCI P2PDMA mapping helpers to pci-p2pdma.h
Luis Chamberlain
mcgrof at kernel.org
Fri Apr 25 17:34:14 PDT 2025
On Wed, Apr 23, 2025 at 11:12:53AM +0300, Leon Romanovsky wrote:
> From: Christoph Hellwig <hch at lst.de>
> +enum pci_p2pdma_map_type {
> + /*
> + * PCI_P2PDMA_MAP_UNKNOWN: Used internally for indicating the mapping
> + * type hasn't been calculated yet. Functions that return this enum
> + * never return this value.
> + */
This last sentence is confusing. How about:
* PCI_P2PDMA_MAP_UNKNOWN: Used internally as an initial state before
* the mapping type has been calculated. Exported routines for the API
* will never return this value.
> + PCI_P2PDMA_MAP_UNKNOWN = 0,
> +
> + /*
> + * Not a PCI P2PDMA transfer.
> + */
> + PCI_P2PDMA_MAP_NONE,
> +
> + /*
> + * PCI_P2PDMA_MAP_NOT_SUPPORTED: Indicates the transaction will
> + * traverse the host bridge and the host bridge is not in the
> + * allowlist. DMA Mapping routines should return an error when
> + * this is returned.
> + */
> + PCI_P2PDMA_MAP_NOT_SUPPORTED,
> +
> + /*
> + * PCI_P2PDMA_BUS_ADDR: Indicates that two devices can talk to
You mean PCI_P2PDMA_MAP_BUS_ADDR
> + * pci_p2pdma_bus_addr_map - map a PCI_P2PDMA_MAP_BUS_ADDR P2P transfer
Hrm, maybe with a bit more clarity:
Translate a physical address to a bus address for a PCI_P2PDMA_MAP_BUS_ADDR
transfer.
Other than that.
Reviewed-by: Luis Chamberlain <mcgrof at kernel.org>
Luis
More information about the Linux-nvme
mailing list