* [PATCH] Check for offline nodes in pci NUMA code
@ 2006-10-13 2:26 Anton Blanchard
0 siblings, 0 replies; only message in thread
From: Anton Blanchard @ 2006-10-13 2:26 UTC (permalink / raw)
To: linuxppc-dev; +Cc: paulus
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>
---
Index: build/arch/powerpc/kernel/pci_64.c
===================================================================
--- build.orig/arch/powerpc/kernel/pci_64.c 2006-10-08 01:18:30.000000000 +1000
+++ build/arch/powerpc/kernel/pci_64.c 2006-10-08 01:23:05.000000000 +1000
@@ -199,8 +199,14 @@ struct pci_controller * pcibios_alloc_co
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;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-10-13 2:26 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-13 2:26 [PATCH] Check for offline nodes in pci NUMA code Anton Blanchard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).