aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/kernel/pci_64.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c
index 74dc76653e1b..5ad87c426bed 100644
--- a/arch/powerpc/kernel/pci_64.c
+++ b/arch/powerpc/kernel/pci_64.c
@@ -227,8 +227,10 @@ struct pci_controller * pcibios_alloc_controller(struct device_node *dev)
227 pci_setup_pci_controller(phb); 227 pci_setup_pci_controller(phb);
228 phb->arch_data = dev; 228 phb->arch_data = dev;
229 phb->is_dynamic = mem_init_done; 229 phb->is_dynamic = mem_init_done;
230 if (dev) 230 if (dev) {
231 PHB_SET_NODE(phb, of_node_to_nid(dev));
231 add_linux_pci_domain(dev, phb); 232 add_linux_pci_domain(dev, phb);
233 }
232 return phb; 234 return phb;
233} 235}
234 236
@@ -1415,3 +1417,12 @@ long sys_pciconfig_iobase(long which, unsigned long in_bus,
1415 1417
1416 return -EOPNOTSUPP; 1418 return -EOPNOTSUPP;
1417} 1419}
1420
1421#ifdef CONFIG_NUMA
1422int pcibus_to_node(struct pci_bus *bus)
1423{
1424 struct pci_controller *phb = pci_bus_to_host(bus);
1425 return phb->node;
1426}
1427EXPORT_SYMBOL(pcibus_to_node);
1428#endif