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
This commit is contained in:
Bjorn Helgaas
2021-09-02 14:56:47 -05:00
4 changed files with 93 additions and 45 deletions

View File

@@ -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 */