aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64/kernel/pci.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-04-24 11:37:29 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-24 11:37:29 -0400
commite270b51df657011983241ec61a1fc7de186e16cd (patch)
tree3397be4cbf31676ca6ebb187903e8cfc2218f223 /arch/sparc64/kernel/pci.c
parent8fa82790fb9dfe57aeafc8de6b6a5c1df63efa06 (diff)
parent227739bf4c110bbd02d0c0f13b272c32de406e4c (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6: (23 commits) sparc: sunzilog uart order [SPARC64]: Detect trap frames in stack backtraces. [SPARC64]: %l6 trap return handling no longer necessary. [SPARC64]: Use trap type stored in pt_regs to handle syscall restart. [SPARC64]: Store magic cookie and trap type in pt_regs. [SPARC64]: PROM debug console can be CON_ANYTIME. sparc64: cleanup after SunOS/Solaris binary emulation removal sparc: cleanup after SunOS binary emulation removal [SPARC64]: Add NUMA support. [SPARC64]: Allocate TSB node-local. [SPARC64]: NUMA device infrastructure. [SPARC64]: Kill pci_iommu_table_init() declaration. [SPARC64]: Once we have the boot cmdline, call parse_early_param() [SPARC64]: Remove unused asm-sparc64/numnodes.h [SPARC64]: Decrease SECTION_SIZE_BITS to 30. [SPARC64]: Initialize MDESC earlier and use lmb_alloc() [SPARC64]: Use lmb_alloc() for PROM device tree. [SPARC64]: Call real_setup_per_cpu_areas() earlier and use lmb_alloc(). [SPARC64]: Fully use LMB information in bootmem_init(). [SPARC64]: Start using LMB information in bootmem_init(). ...
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)