Commit dbb6152e authored by Yinghai Lu's avatar Yinghai Lu Committed by Ingo Molnar

x86: don't call pxm_to_node again

also make bus_numa work even if ACPI_NUMA is not defined.

don't call pxm_to_node again, and use node directly.
Signed-off-by: default avatarYinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent b755de8d
...@@ -171,11 +171,11 @@ struct pci_bus * __devinit pci_acpi_scan_root(struct acpi_device *device, int do ...@@ -171,11 +171,11 @@ struct pci_bus * __devinit pci_acpi_scan_root(struct acpi_device *device, int do
if (node != -1) if (node != -1)
set_mp_bus_to_node(busnum, node); set_mp_bus_to_node(busnum, node);
else else
#endif
node = get_mp_bus_to_node(busnum); node = get_mp_bus_to_node(busnum);
if (node != -1 && !node_online(node)) if (node != -1 && !node_online(node))
node = -1; node = -1;
#endif
/* Allocate per-root-bus (not per bus) arch-specific data. /* Allocate per-root-bus (not per bus) arch-specific data.
* TODO: leak; this memory is never freed. * TODO: leak; this memory is never freed.
...@@ -207,14 +207,16 @@ struct pci_bus * __devinit pci_acpi_scan_root(struct acpi_device *device, int do ...@@ -207,14 +207,16 @@ struct pci_bus * __devinit pci_acpi_scan_root(struct acpi_device *device, int do
if (!bus) if (!bus)
kfree(sd); kfree(sd);
if (bus && node != -1) {
#ifdef CONFIG_ACPI_NUMA #ifdef CONFIG_ACPI_NUMA
if (bus) { if (pxm >= 0)
if (pxm >= 0) {
printk(KERN_DEBUG "bus %02x -> pxm %d -> node %d\n", printk(KERN_DEBUG "bus %02x -> pxm %d -> node %d\n",
busnum, pxm, pxm_to_node(pxm)); busnum, pxm, node);
} #else
} printk(KERN_DEBUG "bus %02x -> node %d\n",
busnum, node);
#endif #endif
}
if (bus && (pci_probe & PCI_USE__CRS)) if (bus && (pci_probe & PCI_USE__CRS))
get_current_resources(device, busnum, domain, bus); get_current_resources(device, busnum, domain, bus);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment