Skip to content

Commit

Permalink
x86: make dev_to_node return online node
Browse files Browse the repository at this point in the history
a numa system (with multi HT chains) may return node without ram. Aka it
is not online. Try to get an online node, otherwise return -1.

Signed-off-by: Yinghai Lu <yinghai.lu@sun.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
  • Loading branch information
Yinghai Lu authored and Ingo Molnar committed Jul 8, 2008
1 parent 1b40a89 commit b755de8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions arch/x86/pci/acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,9 @@ struct pci_bus * __devinit pci_acpi_scan_root(struct acpi_device *device, int do
set_mp_bus_to_node(busnum, node);
else
node = get_mp_bus_to_node(busnum);

if (node != -1 && !node_online(node))
node = -1;
#endif

/* Allocate per-root-bus (not per bus) arch-specific data.
Expand Down

0 comments on commit b755de8

Please sign in to comment.