@@ -336,8 +336,9 @@ common_init_pci(void)
pci_add_resource_offset(&resources, hose->mem_space,
hose->mem_space->start);
- bus = pci_scan_root_bus(NULL, next_busno, alpha_mv.pci_ops,
- hose, &resources);
+ bus = pci_scan_root_bus(NULL,
+ PCI_DOMBUS(hose->index, next_busno),
+ alpha_mv.pci_ops, hose, &resources);
if (!bus)
continue;
hose->bus = bus;
@@ -206,10 +206,10 @@ nautilus_init_pci(void)
unsigned long memtop = max_low_pfn << PAGE_SHIFT;
/* Scan our single hose. */
- bus = pci_scan_bus(0, alpha_mv.pci_ops, hose);
+ bus = pci_scan_bus(PCI_DOMBUS(hose->index, 0),
+ alpha_mv.pci_ops, hose);
if (!bus)
return;
-
hose->bus = bus;
pcibios_claim_one_bus(bus);
@@ -465,8 +465,8 @@ struct pci_bus *pci_acpi_scan_root(struct acpi_pci_root *root)
* should handle the case here, but it appears that IA64 hasn't
* such quirk. So we just ignore the case now.
*/
- pbus = pci_create_root_bus(NULL, bus, &pci_root_ops, controller,
- &info->resources);
+ pbus = pci_create_root_bus(NULL, PCI_DOMBUS(domain, bus),
+ &pci_root_ops, controller, &info->resources);
if (!pbus) {
pci_free_resource_list(&info->resources);
__release_pci_root_info(info);
@@ -266,8 +266,9 @@ sn_pci_controller_fixup(int segment, int busnum, struct pci_bus *bus)
pci_add_resource_offset(&resources, &res[1],
prom_bussoft_ptr->bs_legacy_mem);
- bus = pci_scan_root_bus(NULL, busnum, &pci_root_ops, controller,
- &resources);
+ bus = pci_scan_root_bus(NULL,
+ PCI_DOMBUS(controller->segment, busnum),
+ &pci_root_ops, controller, &resources);
if (bus == NULL) {
kfree(res);
kfree(controller);
@@ -1350,8 +1350,9 @@ static void pcibios_scan_phb(struct pci_controller *hose)
pcibios_setup_phb_resources(hose, &resources);
- bus = pci_scan_root_bus(hose->parent, hose->first_busno,
- hose->ops, hose, &resources);
+ bus = pci_scan_root_bus(hose->parent,
+ PCI_DOMBUS(hose->global_number, hose->first_busno),
+ hose->ops, hose, &resources);
if (bus == NULL) {
pr_err("Failed to create bus for PCI domain %04x\n",
hose->global_number);
@@ -92,8 +92,8 @@ static void pcibios_scanbus(struct pci_controller *hose)
pci_add_resource_offset(&resources,
hose->mem_resource, hose->mem_offset);
pci_add_resource_offset(&resources, hose->io_resource, hose->io_offset);
- bus = pci_scan_root_bus(NULL, next_busno, hose->pci_ops, hose,
- &resources);
+ bus = pci_scan_root_bus(NULL, PCI_DOMBUS(hose->index, next_busno),
+ hose->pci_ops, hose, &resources);
if (!bus)
pci_free_resource_list(&resources);
@@ -1612,8 +1612,9 @@ void pcibios_scan_phb(struct pci_controller *hose)
pci_add_resource(&resources, &hose->busn);
/* Create an empty bus for the toplevel */
- bus = pci_create_root_bus(hose->parent, hose->first_busno,
- hose->ops, hose, &resources);
+ bus = pci_create_root_bus(hose->parent,
+ PCI_DOMBUS(hose->global_number, hose->first_busno),
+ hose->ops, hose, &resources);
if (bus == NULL) {
pr_err("Failed to create bus for PCI domain %04x\n",
hose->global_number);
@@ -770,8 +770,9 @@ static int zpci_scan_bus(struct zpci_dev *zdev)
if (ret)
return ret;
- zdev->bus = pci_scan_root_bus(NULL, ZPCI_BUS_NR, &pci_root_ops,
- zdev, &resources);
+ zdev->bus = pci_scan_root_bus(NULL,
+ PCI_DOMBUS(zdev->domain, ZPCI_BUS_NR), &pci_root_ops,
+ zdev, &resources);
if (!zdev->bus) {
zpci_cleanup_bus_resources(zdev);
return -EIO;
@@ -52,8 +52,9 @@ static void pcibios_scanbus(struct pci_channel *hose)
pci_add_resource_offset(&resources, res, offset);
}
- bus = pci_scan_root_bus(NULL, next_busno, hose->pci_ops, hose,
- &resources);
+ bus = pci_scan_root_bus(NULL,
+ PCI_DOMBUS(hose->index, next_busno),
+ hose->pci_ops, hose, &resources);
hose->bus = bus;
need_domain_info = need_domain_info || hose->index;
@@ -667,8 +667,9 @@ struct pci_bus *pci_scan_one_pbm(struct pci_pbm_info *pbm,
pbm->busn.end = pbm->pci_last_busno;
pbm->busn.flags = IORESOURCE_BUS;
pci_add_resource(&resources, &pbm->busn);
- bus = pci_create_root_bus(parent, pbm->pci_first_busno, pbm->pci_ops,
- pbm, &resources);
+ bus = pci_create_root_bus(parent,
+ PCI_DOMBUS(pbm->index, pbm->pci_first_busno),
+ pbm->pci_ops, pbm, &resources);
if (!bus) {
printk(KERN_ERR "Failed to create bus for %s\n",
node->full_name);
@@ -306,8 +306,9 @@ int __init pcibios_init(void)
pci_add_resource(&resources, &ioport_resource);
pci_add_resource(&resources, &iomem_resource);
- bus = pci_scan_root_bus(NULL, 0, controller->ops,
- controller, &resources);
+ bus = pci_scan_root_bus(NULL,
+ PCI_DOMBUS(controller->index, 0),
+ controller->ops, controller, &resources);
controller->root_bus = bus;
controller->last_busno = bus->busn_res.end;
}
@@ -881,8 +881,9 @@ int __init pcibios_init(void)
controller->mem_offset);
pci_add_resource(&resources, &controller->io_space);
controller->first_busno = next_busno;
- bus = pci_scan_root_bus(NULL, next_busno, controller->ops,
- controller, &resources);
+ bus = pci_scan_root_bus(NULL,
+ PCI_DOMBUS(controller->index, next_busno),
+ controller->ops, controller, &resources);
controller->root_bus = bus;
next_busno = bus->busn_res.end + 1;
}
@@ -424,9 +424,10 @@ struct pci_bus *pci_acpi_scan_root(struct acpi_pci_root *root)
}
if (!setup_mcfg_map(info, domain, (u8)root->secondary.start,
- (u8)root->secondary.end, root->mcfg_addr))
- bus = pci_create_root_bus(NULL, busnum, &pci_root_ops,
- sd, &resources);
+ (u8)root->secondary.end, root->mcfg_addr))
+ bus = pci_create_root_bus(NULL,
+ PCI_DOMBUS(domain, busnum), &pci_root_ops,
+ sd, &resources);
if (bus) {
pci_scan_child_bus(bus);
@@ -486,7 +486,8 @@ void pcibios_scan_root(int busnum)
sd->node = x86_pci_root_bus_node(busnum);
x86_pci_root_bus_resources(busnum, &resources);
printk(KERN_DEBUG "PCI: Probing PCI hardware (bus %02x)\n", busnum);
- bus = pci_scan_root_bus(NULL, busnum, &pci_root_ops, sd, &resources);
+ bus = pci_scan_root_bus(NULL, PCI_DOMBUS(0, busnum),
+ &pci_root_ops, sd, &resources);
if (!bus) {
pci_free_resource_list(&resources);
kfree(sd);
@@ -478,8 +478,9 @@ static int pcifront_scan_root(struct pcifront_device *pdev,
pci_lock_rescan_remove();
- b = pci_scan_root_bus(&pdev->xdev->dev, bus,
- &pcifront_bus_ops, sd, &resources);
+ b = pci_scan_root_bus(&pdev->xdev->dev,
+ PCI_DOMBUS(sd->domain, bus),
+ &pcifront_bus_ops, sd, &resources);
if (!b) {
dev_err(&pdev->xdev->dev,
"Error creating PCI Frontend Bus!\n");