mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 05:31:08 -04:00
PCI/P2PDMA: Add provider's pci_dev to pci_p2pdma_pagemap struct
The provider will be needed to figure out how to map a device. Link: https://lore.kernel.org/r/[email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Logan Gunthorpe <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]>
This commit is contained in:
1 parent
a6e6fe6549
commit
0afea38143
1 file changed
+2
@@ -27,6 +27,7 @@ struct pci_p2pdma {
|
||||
|
||||
struct pci_p2pdma_pagemap {
|
||||
struct dev_pagemap pgmap;
|
||||
struct pci_dev *provider;
|
||||
u64 bus_offset;
|
||||
};
|
||||
|
||||
@@ -178,6 +179,7 @@ int pci_p2pdma_add_resource(struct pci_dev *pdev, int bar, size_t size,
|
||||
pgmap->res.flags = pci_resource_flags(pdev, bar);
|
||||
pgmap->type = MEMORY_DEVICE_PCI_P2PDMA;
|
||||
|
||||
p2p_pgmap->provider = pdev;
|
||||
p2p_pgmap->bus_offset = pci_bus_address(pdev, bar) -
|
||||
pci_resource_start(pdev, bar);
|
||||
|
||||
|
||||
Reference in new issue
Block a user