in pci/pci-common.c [980:1004]
static int __init pcibios_init(void)
{
struct pci_controller *hose, *tmp;
int next_busno = 0;
pr_info("PCI: Probing PCI hardware\n");
/* Scan all of the recorded PCI controllers. */
list_for_each_entry_safe(hose, tmp, &hose_list, list_node) {
hose->last_busno = 0xff;
pcibios_scan_phb(hose);
if (next_busno <= hose->last_busno)
next_busno = hose->last_busno + 1;
}
pci_bus_count = next_busno;
/* Call common code to handle resource allocation */
pcibios_resource_survey();
list_for_each_entry_safe(hose, tmp, &hose_list, list_node) {
if (hose->bus)
pci_bus_add_devices(hose->bus);
}
return 0;
}