diff options
| author | Bjorn Helgaas <bhelgaas@google.com> | 2026-04-13 20:50:03 +0300 |
|---|---|---|
| committer | Bjorn Helgaas <bhelgaas@google.com> | 2026-04-13 20:50:03 +0300 |
| commit | a735a513ff2c219f3dc4f9c159f3a328bfb41834 (patch) | |
| tree | e5f3e135676d1676280391c558857c0d198ea93d | |
| parent | 3ebccb123dfa8b475ee77b9c49bc775152e70205 (diff) | |
| parent | 70cf146a674c447753ceeb34246ad0afdd0064bb (diff) | |
| download | linux-a735a513ff2c219f3dc4f9c159f3a328bfb41834.tar.xz | |
Merge branch 'pci/p2pdma'
- Allow wildcards in list of host bridges that support peer-to-peer DMA
between hierarchy domains and add all Google SoCs (Jacob Moroni)
* pci/p2pdma:
PCI/P2PDMA: Add Google SoCs to the P2P DMA host bridge list
PCI/P2PDMA: Allow wildcard Device IDs in host bridge list
| -rw-r--r-- | drivers/pci/p2pdma.c | 10 | ||||
| -rw-r--r-- | include/linux/pci_ids.h | 2 |
2 files changed, 10 insertions, 2 deletions
diff --git a/drivers/pci/p2pdma.c b/drivers/pci/p2pdma.c index e0f546166eb8..7c898542af8d 100644 --- a/drivers/pci/p2pdma.c +++ b/drivers/pci/p2pdma.c @@ -530,7 +530,7 @@ static bool cpu_supports_p2pdma(void) static const struct pci_p2pdma_whitelist_entry { unsigned short vendor; - unsigned short device; + int device; enum { REQ_SAME_HOST_BRIDGE = 1 << 0, } flags; @@ -548,6 +548,8 @@ static const struct pci_p2pdma_whitelist_entry { {PCI_VENDOR_ID_INTEL, 0x2033, 0}, {PCI_VENDOR_ID_INTEL, 0x2020, 0}, {PCI_VENDOR_ID_INTEL, 0x09a2, 0}, + /* Google SoCs. */ + {PCI_VENDOR_ID_GOOGLE, PCI_ANY_ID, 0}, {} }; @@ -601,8 +603,12 @@ static bool __host_bridge_whitelist(struct pci_host_bridge *host, device = root->device; for (entry = pci_p2pdma_whitelist; entry->vendor; entry++) { - if (vendor != entry->vendor || device != entry->device) + if (vendor != entry->vendor) continue; + + if (entry->device != PCI_ANY_ID && device != entry->device) + continue; + if (entry->flags & REQ_SAME_HOST_BRIDGE && !same_host_bridge) return false; diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 406abf629be2..24cb42f66e4b 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h @@ -2586,6 +2586,8 @@ #define PCI_VENDOR_ID_AZWAVE 0x1a3b +#define PCI_VENDOR_ID_GOOGLE 0x1ae0 + #define PCI_VENDOR_ID_REDHAT_QUMRANET 0x1af4 #define PCI_SUBVENDOR_ID_REDHAT_QUMRANET 0x1af4 #define PCI_SUBDEVICE_ID_QEMU 0x1100 |
