diff options
author | David S. Miller <davem@davemloft.net> | 2008-03-19 07:52:48 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-04-24 02:32:16 -0400 |
commit | c1b1a5f1f1b2612b69b67381b223bce9f8ec4da5 (patch) | |
tree | e95abb7a3dbd0ca6c341c44f2b69dd174fd03bec /arch/sparc64/kernel/pci.c | |
parent | 0c49a573ea93f777fd27f26b7853e7bf5a20e1a3 (diff) |
[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 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 | ||
1165 | int pcibus_to_node(struct pci_bus *pbus) | ||
1166 | { | ||
1167 | struct pci_pbm_info *pbm = pbus->sysdata; | ||
1168 | |||
1169 | return pbm->numa_node; | ||
1170 | } | ||
1171 | EXPORT_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 | ||
1164 | int pci_domain_nr(struct pci_bus *pbus) | 1176 | int pci_domain_nr(struct pci_bus *pbus) |