summaryrefslogtreecommitdiff
path: root/include/linux/pci.h
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2021-09-02 14:56:47 -0500
committerBjorn Helgaas <bhelgaas@google.com>2021-09-02 14:56:47 -0500
commita1e4ca8eb963f58fc9c2c26a971d86456ea717f5 (patch)
tree476494ae29cc3785cf98ec13a63cf9944e9d3756 /include/linux/pci.h
parent53cb14d2566205ed9a08649fdc59e9446adf0727 (diff)
parent88f94c7f8f40d7e26f991f6f6ed914ff44361d75 (diff)
Merge branch 'remotes/lorenzo/pci/hyper-v'
- Add domain_nr in struct pci_host_bridge (Boqun Feng) - Use host bridge MSI domain for root buses if present (Boqun Feng) - Allow ARM64 virtual host bridge with no ACPI companion (e.g., Hyper-V) (Boqun Feng) - Make Hyper-V enumeration more generic (Arnd Bergmann) - Set Hyper-V domain_nr at probe-time (Boqun Feng) - Set up Hyper-V MSI domain at bridge probe-time (Boqun Feng) - Enable Hyper-V bridge probing on ARM64 (Boqun Feng) * remotes/lorenzo/pci/hyper-v: PCI: hv: Turn on the host bridge probing on ARM64 PCI: hv: Set up MSI domain at bridge probing time PCI: hv: Set ->domain_nr of pci_host_bridge at probing time PCI: hv: Generify PCI probing arm64: PCI: Support root bridge preparation for Hyper-V arm64: PCI: Restructure pcibios_root_bridge_prepare() PCI: Support populating MSI domains of root buses via bridges PCI: Introduce domain_nr in pci_host_bridge
Diffstat (limited to 'include/linux/pci.h')
-rw-r--r--include/linux/pci.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 0e29a36accb6..3edbd75ceb42 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -529,6 +529,16 @@ static inline int pci_channel_offline(struct pci_dev *pdev)
return (pdev->error_state != pci_channel_io_normal);
}
+/*
+ * Currently in ACPI spec, for each PCI host bridge, PCI Segment
+ * Group number is limited to a 16-bit value, therefore (int)-1 is
+ * not a valid PCI domain number, and can be used as a sentinel
+ * value indicating ->domain_nr is not set by the driver (and
+ * CONFIG_PCI_DOMAINS_GENERIC=y archs will set it with
+ * pci_bus_find_domain_nr()).
+ */
+#define PCI_DOMAIN_NR_NOT_SET (-1)
+
struct pci_host_bridge {
struct device dev;
struct pci_bus *bus; /* Root bus */
@@ -536,6 +546,7 @@ struct pci_host_bridge {
struct pci_ops *child_ops;
void *sysdata;
int busnr;
+ int domain_nr;
struct list_head windows; /* resource_entry */
struct list_head dma_ranges; /* dma ranges resource list */
u8 (*swizzle_irq)(struct pci_dev *, u8 *); /* Platform IRQ swizzler */