diff options
author | David S. Miller <davem@davemloft.net> | 2008-03-19 04:52:48 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-04-23 23:32:16 -0700 |
commit | c1b1a5f1f1b2612b69b67381b223bce9f8ec4da5 (patch) | |
tree | e95abb7a3dbd0ca6c341c44f2b69dd174fd03bec /arch/sparc64/kernel/pci.c | |
parent | 0c49a573ea93f777fd27f26b7853e7bf5a20e1a3 (diff) | |
download | op-kernel-dev-c1b1a5f1f1b2612b69b67381b223bce9f8ec4da5.zip op-kernel-dev-c1b1a5f1f1b2612b69b67381b223bce9f8ec4da5.tar.gz |
[SPARC64]: NUMA device infrastructure.
Record and propagate NUMA information for devices.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/kernel/pci.c')
-rw-r--r-- | arch/sparc64/kernel/pci.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/sparc64/kernel/pci.c b/arch/sparc64/kernel/pci.c index 545356b..49f9127 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, sd->host_controller = pbm; sd->prom_node = node; sd->op = of_find_device_by_node(node); + sd->numa_node = pbm->numa_node; sd = &sd->op->dev.archdata; sd->iommu = pbm->iommu; sd->stc = &pbm->stc; + sd->numa_node = pbm->numa_node; type = of_get_property(node, "device_type", NULL); if (type == NULL) @@ -1159,6 +1161,16 @@ int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, return 0; } +#ifdef CONFIG_NUMA +int pcibus_to_node(struct pci_bus *pbus) +{ + struct pci_pbm_info *pbm = pbus->sysdata; + + return pbm->numa_node; +} +EXPORT_SYMBOL(pcibus_to_node); +#endif + /* Return the domain nuber for this pci bus */ int pci_domain_nr(struct pci_bus *pbus) |