PCI: hv: Generify PCI probing
authorArnd Bergmann <arnd@arndb.de>
Mon, 26 Jul 2021 18:06:54 +0000 (02:06 +0800)
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Mon, 23 Aug 2021 09:59:26 +0000 (10:59 +0100)
commit418cb6c8e051119125b886c879efdacb04df7165
tree6e4480ecd656a8b96900ebc111f512849ec09788
parent7d40c0f70d92291605c4498b8ee4b3a3c3ba07b1
PCI: hv: Generify PCI probing

In order to support ARM64 Hyper-V PCI, we need to set up the bridge at
probing time because ARM64 is a PCI_DOMAIN_GENERIC=y arch and we don't
have pci_config_window (ARM64 sysdata) for a PCI root bus on Hyper-V, so
it's impossible to retrieve the information (e.g. PCI domains, MSI
domains) from bus sysdata on ARM64 after creation.

Originally in create_root_hv_pci_bus(), pci_create_root_bus() is used to
create the root bus and the corresponding bridge based on x86 sysdata.
Now we create a bridge first and then call pci_scan_root_bus_bridge(),
which allows us to do the necessary set-ups for the bridge.

Link: https://lore.kernel.org/r/20210726180657.142727-6-boqun.feng@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
drivers/pci/controller/pci-hyperv.c