提交 284a9406 编写于 作者: A Anton Blanchard 提交者: Paul Mackerras

[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: NAnton Blanchard <anton@samba.org>
Signed-off-by: NPaul Mackerras <paulus@samba.org>
上级 00ae36de
...@@ -199,8 +199,14 @@ struct pci_controller * pcibios_alloc_controller(struct device_node *dev) ...@@ -199,8 +199,14 @@ struct pci_controller * pcibios_alloc_controller(struct device_node *dev)
pci_setup_pci_controller(phb); pci_setup_pci_controller(phb);
phb->arch_data = dev; phb->arch_data = dev;
phb->is_dynamic = mem_init_done; phb->is_dynamic = mem_init_done;
if (dev) if (dev) {
PHB_SET_NODE(phb, of_node_to_nid(dev)); int nid = of_node_to_nid(dev);
if (nid < 0 || !node_online(nid))
nid = -1;
PHB_SET_NODE(phb, nid);
}
return phb; return phb;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册