From: Yinghai Lu Date: Wed, 20 Feb 2008 20:41:52 +0000 (-0800) Subject: x86: make dev_to_node return online node X-Git-Tag: v2.6.27-rc1~1106^2~246^2~16 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b755de8dfdfef97effaa91379ffafcb81f4d62a1;p=linux-2.6 x86: make dev_to_node return online node 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 Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner --- diff --git a/arch/x86/pci/acpi.c b/arch/x86/pci/acpi.c index d95de2f199..ea8685f89b 100644 --- a/arch/x86/pci/acpi.c +++ b/arch/x86/pci/acpi.c @@ -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.