aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-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