x86/PCI: Use pcibios_scan_root() instead of pci_scan_bus_on_node()
pcibios_scan_root() looks up the bus's NUMA node, then calls pci_scan_bus_on_node(). This uses pcibios_scan_root() directly and drops the node lookup in the callers. Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
parent
8d7d818676
commit
3d2a366190
@ -136,11 +136,9 @@ static void __init pirq_peer_trick(void)
|
|||||||
busmap[e->bus] = 1;
|
busmap[e->bus] = 1;
|
||||||
}
|
}
|
||||||
for (i = 1; i < 256; i++) {
|
for (i = 1; i < 256; i++) {
|
||||||
int node;
|
|
||||||
if (!busmap[i] || pci_find_bus(0, i))
|
if (!busmap[i] || pci_find_bus(0, i))
|
||||||
continue;
|
continue;
|
||||||
node = get_mp_bus_to_node(i);
|
if (pcibios_scan_root(i))
|
||||||
if (pci_scan_bus_on_node(i, &pci_root_ops, node))
|
|
||||||
printk(KERN_INFO "PCI: Discovered primary peer "
|
printk(KERN_INFO "PCI: Discovered primary peer "
|
||||||
"bus %02x [IRQ]\n", i);
|
"bus %02x [IRQ]\n", i);
|
||||||
}
|
}
|
||||||
|
@ -37,19 +37,17 @@ int __init pci_legacy_init(void)
|
|||||||
void pcibios_scan_specific_bus(int busn)
|
void pcibios_scan_specific_bus(int busn)
|
||||||
{
|
{
|
||||||
int devfn;
|
int devfn;
|
||||||
long node;
|
|
||||||
u32 l;
|
u32 l;
|
||||||
|
|
||||||
if (pci_find_bus(0, busn))
|
if (pci_find_bus(0, busn))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
node = get_mp_bus_to_node(busn);
|
|
||||||
for (devfn = 0; devfn < 256; devfn += 8) {
|
for (devfn = 0; devfn < 256; devfn += 8) {
|
||||||
if (!raw_pci_read(0, busn, devfn, PCI_VENDOR_ID, 2, &l) &&
|
if (!raw_pci_read(0, busn, devfn, PCI_VENDOR_ID, 2, &l) &&
|
||||||
l != 0x0000 && l != 0xffff) {
|
l != 0x0000 && l != 0xffff) {
|
||||||
DBG("Found device at %02x:%02x [%04x]\n", busn, devfn, l);
|
DBG("Found device at %02x:%02x [%04x]\n", busn, devfn, l);
|
||||||
printk(KERN_INFO "PCI: Discovered peer bus %02x\n", busn);
|
printk(KERN_INFO "PCI: Discovered peer bus %02x\n", busn);
|
||||||
pci_scan_bus_on_node(busn, &pci_root_ops, node);
|
pcibios_scan_root(busn);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user