diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2014-01-24 13:50:48 -0500 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2014-02-03 12:38:18 -0500 |
commit | 3d2a366190778f30a2f10b5edaf32bcb236840fd (patch) | |
tree | d60c3bd795cc5e4a39b9f58d0de2c56a38ddd639 | |
parent | 8d7d818676d3851b3ec0c94644e760d0bfac2608 (diff) |
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>
-rw-r--r-- | arch/x86/pci/irq.c | 4 | ||||
-rw-r--r-- | arch/x86/pci/legacy.c | 4 |
2 files changed, 2 insertions, 6 deletions
diff --git a/arch/x86/pci/irq.c b/arch/x86/pci/irq.c index 372e9b8989b3..8658874165c2 100644 --- a/arch/x86/pci/irq.c +++ b/arch/x86/pci/irq.c | |||
@@ -136,11 +136,9 @@ static void __init pirq_peer_trick(void) | |||
136 | busmap[e->bus] = 1; | 136 | busmap[e->bus] = 1; |
137 | } | 137 | } |
138 | for (i = 1; i < 256; i++) { | 138 | for (i = 1; i < 256; i++) { |
139 | int node; | ||
140 | if (!busmap[i] || pci_find_bus(0, i)) | 139 | if (!busmap[i] || pci_find_bus(0, i)) |
141 | continue; | 140 | continue; |
142 | node = get_mp_bus_to_node(i); | 141 | if (pcibios_scan_root(i)) |
143 | if (pci_scan_bus_on_node(i, &pci_root_ops, node)) | ||
144 | printk(KERN_INFO "PCI: Discovered primary peer " | 142 | printk(KERN_INFO "PCI: Discovered primary peer " |
145 | "bus %02x [IRQ]\n", i); | 143 | "bus %02x [IRQ]\n", i); |
146 | } | 144 | } |
diff --git a/arch/x86/pci/legacy.c b/arch/x86/pci/legacy.c index 4db96fb1c232..5b662c0faf8c 100644 --- a/arch/x86/pci/legacy.c +++ b/arch/x86/pci/legacy.c | |||
@@ -37,19 +37,17 @@ int __init pci_legacy_init(void) | |||
37 | void pcibios_scan_specific_bus(int busn) | 37 | void pcibios_scan_specific_bus(int busn) |
38 | { | 38 | { |
39 | int devfn; | 39 | int devfn; |
40 | long node; | ||
41 | u32 l; | 40 | u32 l; |
42 | 41 | ||
43 | if (pci_find_bus(0, busn)) | 42 | if (pci_find_bus(0, busn)) |
44 | return; | 43 | return; |
45 | 44 | ||
46 | node = get_mp_bus_to_node(busn); | ||
47 | for (devfn = 0; devfn < 256; devfn += 8) { | 45 | for (devfn = 0; devfn < 256; devfn += 8) { |
48 | if (!raw_pci_read(0, busn, devfn, PCI_VENDOR_ID, 2, &l) && | 46 | if (!raw_pci_read(0, busn, devfn, PCI_VENDOR_ID, 2, &l) && |
49 | l != 0x0000 && l != 0xffff) { | 47 | l != 0x0000 && l != 0xffff) { |
50 | DBG("Found device at %02x:%02x [%04x]\n", busn, devfn, l); | 48 | DBG("Found device at %02x:%02x [%04x]\n", busn, devfn, l); |
51 | printk(KERN_INFO "PCI: Discovered peer bus %02x\n", busn); | 49 | printk(KERN_INFO "PCI: Discovered peer bus %02x\n", busn); |
52 | pci_scan_bus_on_node(busn, &pci_root_ops, node); | 50 | pcibios_scan_root(busn); |
53 | return; | 51 | return; |
54 | } | 52 | } |
55 | } | 53 | } |