PCI/P2PDMA: Add constants for map type results to upstream_bridge_distance()
authorLogan Gunthorpe <logang@deltatee.com>
Mon, 12 Aug 2019 17:30:37 +0000 (11:30 -0600)
committerBjorn Helgaas <bhelgaas@google.com>
Fri, 16 Aug 2019 13:40:23 +0000 (08:40 -0500)
commit72583084e3fe333c27bc37527efe455d27eaf0b1
treeb0689f20f0a5708327628fad0cb788c51389f82c
parent0afea3814358c97e2964710ba16fbb0b54ceda0e
PCI/P2PDMA: Add constants for map type results to upstream_bridge_distance()

Add constant flags to indicate how two devices will be mapped or if they
are unsupported. upstream_bridge_distance() will now return the
mapping type and the distance in a passed-by-reference argument.

This helps annotate the code better, but the main reason is so we can use
the information to store the required mapping method in an xarray.

Link: https://lore.kernel.org/r/20190730163545.4915-4-logang@deltatee.com
Link: https://lore.kernel.org/r/20190812173048.9186-4-logang@deltatee.com
Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
drivers/pci/p2pdma.c