aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Blanchard <anton@samba.org>2006-10-12 22:26:57 -0400
committerPaul Mackerras <paulus@samba.org>2006-10-16 01:53:30 -0400
commit284a940675a64df253e3dffc60b09bb4bbb149e4 (patch)
treebee2ff81586c08e07bcdb831540e84602f57636a
parent00ae36de49cc718d4122e1c8aac96fd1a5a2553c (diff)
[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 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)
199 pci_setup_pci_controller(phb); 199 pci_setup_pci_controller(phb);
200 phb->arch_data = dev; 200 phb->arch_data = dev;
201 phb->is_dynamic = mem_init_done; 201 phb->is_dynamic = mem_init_done;
202 if (dev) 202 if (dev) {
203 PHB_SET_NODE(phb, of_node_to_nid(dev)); 203 int nid = of_node_to_nid(dev);
204
205 if (nid < 0 || !node_online(nid))
206 nid = -1;
207
208 PHB_SET_NODE(phb, nid);
209 }
204 return phb; 210 return phb;
205} 211}
206 212