diff options
author | Anton Blanchard <anton@samba.org> | 2006-10-13 06:26:57 +0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-10-16 09:53:30 +0400 |
commit | 284a940675a64df253e3dffc60b09bb4bbb149e4 (patch) | |
tree | bee2ff81586c08e07bcdb831540e84602f57636a /arch/powerpc/kernel/pci_64.c | |
parent | 00ae36de49cc718d4122e1c8aac96fd1a5a2553c (diff) | |
download | linux-284a940675a64df253e3dffc60b09bb4bbb149e4.tar.xz |
[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>
Diffstat (limited to 'arch/powerpc/kernel/pci_64.c')
-rw-r--r-- | arch/powerpc/kernel/pci_64.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c index 78d3c0fc8dfb..9bae8a5bf671 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; } |