summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Blanchard <anton@samba.org>2006-10-13 12:26:57 +1000
committerPaul Mackerras <paulus@samba.org>2006-10-16 15:53:30 +1000
commit284a940675a64df253e3dffc60b09bb4bbb149e4 (patch)
treebee2ff81586c08e07bcdb831540e84602f57636a
parent00ae36de49cc718d4122e1c8aac96fd1a5a2553c (diff)
downloadop-kernel-dev-284a940675a64df253e3dffc60b09bb4bbb149e4.zip
op-kernel-dev-284a940675a64df253e3dffc60b09bb4bbb149e4.tar.gz
[POWERPC] Check for offline nodes in pci NUMA code
During boot we bring up all memory and cpu nodes. Normally a PCI device will be in one of these online nodes, however in some weird setups it may not. We have only seen this in the lab but we may as well check for the case and fallback to -1 (all nodes). Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
-rw-r--r--arch/powerpc/kernel/pci_64.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c
index 78d3c0f..9bae8a5 100644
--- a/arch/powerpc/kernel/pci_64.c
+++ b/arch/powerpc/kernel/pci_64.c
@@ -199,8 +199,14 @@ struct pci_controller * pcibios_alloc_controller(struct device_node *dev)
pci_setup_pci_controller(phb);
phb->arch_data = dev;
phb->is_dynamic = mem_init_done;
- if (dev)
- PHB_SET_NODE(phb, of_node_to_nid(dev));
+ if (dev) {
+ int nid = of_node_to_nid(dev);
+
+ if (nid < 0 || !node_online(nid))
+ nid = -1;
+
+ PHB_SET_NODE(phb, nid);
+ }
return phb;
}
OpenPOWER on IntegriCloud