aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64/kernel/pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc64/kernel/pci.c')
-rw-r--r--arch/sparc64/kernel/pci.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/sparc64/kernel/pci.c b/arch/sparc64/kernel/pci.c
index 545356b00e2e..49f912766519 100644
--- a/arch/sparc64/kernel/pci.c
+++ b/arch/sparc64/kernel/pci.c
@@ -369,10 +369,12 @@ struct pci_dev *of_create_pci_dev(struct pci_pbm_info *pbm,
369 sd->host_controller = pbm; 369 sd->host_controller = pbm;
370 sd->prom_node = node; 370 sd->prom_node = node;
371 sd->op = of_find_device_by_node(node); 371 sd->op = of_find_device_by_node(node);
372 sd->numa_node = pbm->numa_node;
372 373
373 sd = &sd->op->dev.archdata; 374 sd = &sd->op->dev.archdata;
374 sd->iommu = pbm->iommu; 375 sd->iommu = pbm->iommu;
375 sd->stc = &pbm->stc; 376 sd->stc = &pbm->stc;
377 sd->numa_node = pbm->numa_node;
376 378
377 type = of_get_property(node, "device_type", NULL); 379 type = of_get_property(node, "device_type", NULL);
378 if (type == NULL) 380 if (type == NULL)
@@ -1159,6 +1161,16 @@ int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
1159 return 0; 1161 return 0;
1160} 1162}
1161 1163
1164#ifdef CONFIG_NUMA
1165int pcibus_to_node(struct pci_bus *pbus)
1166{
1167 struct pci_pbm_info *pbm = pbus->sysdata;
1168
1169 return pbm->numa_node;
1170}
1171EXPORT_SYMBOL(pcibus_to_node);
1172#endif
1173
1162/* Return the domain nuber for this pci bus */ 1174/* Return the domain nuber for this pci bus */
1163 1175
1164int pci_domain_nr(struct pci_bus *pbus) 1176int pci_domain_nr(struct pci_bus *pbus)