diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/ia64/sn/pci/pcibr/pcibr_provider.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/arch/ia64/sn/pci/pcibr/pcibr_provider.c b/arch/ia64/sn/pci/pcibr/pcibr_provider.c index ff9c7de925d1..5862a709adf5 100644 --- a/arch/ia64/sn/pci/pcibr/pcibr_provider.c +++ b/arch/ia64/sn/pci/pcibr/pcibr_provider.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <asm/sn/pcibus_provider_defs.h> | 15 | #include <asm/sn/pcibus_provider_defs.h> |
16 | #include <asm/sn/pcidev.h> | 16 | #include <asm/sn/pcidev.h> |
17 | #include <asm/sn/sn_sal.h> | 17 | #include <asm/sn/sn_sal.h> |
18 | #include <asm/sn/sn2/sn_hwperf.h> | ||
18 | #include "xtalk/xwidgetdev.h" | 19 | #include "xtalk/xwidgetdev.h" |
19 | #include "xtalk/hubdev.h" | 20 | #include "xtalk/hubdev.h" |
20 | 21 | ||
@@ -88,6 +89,7 @@ void * | |||
88 | pcibr_bus_fixup(struct pcibus_bussoft *prom_bussoft, struct pci_controller *controller) | 89 | pcibr_bus_fixup(struct pcibus_bussoft *prom_bussoft, struct pci_controller *controller) |
89 | { | 90 | { |
90 | int nasid, cnode, j; | 91 | int nasid, cnode, j; |
92 | cnodeid_t near_cnode; | ||
91 | struct hubdev_info *hubdev_info; | 93 | struct hubdev_info *hubdev_info; |
92 | struct pcibus_info *soft; | 94 | struct pcibus_info *soft; |
93 | struct sn_flush_device_list *sn_flush_device_list; | 95 | struct sn_flush_device_list *sn_flush_device_list; |
@@ -161,12 +163,18 @@ pcibr_bus_fixup(struct pcibus_bussoft *prom_bussoft, struct pci_controller *cont | |||
161 | memset(soft->pbi_int_ate_resource.ate, 0, | 163 | memset(soft->pbi_int_ate_resource.ate, 0, |
162 | (soft->pbi_int_ate_size * sizeof(uint64_t))); | 164 | (soft->pbi_int_ate_size * sizeof(uint64_t))); |
163 | 165 | ||
164 | if (prom_bussoft->bs_asic_type == PCIIO_ASIC_TYPE_TIOCP) | 166 | if (prom_bussoft->bs_asic_type == PCIIO_ASIC_TYPE_TIOCP) { |
165 | /* | 167 | /* TIO PCI Bridge: find nearest node with CPUs */ |
166 | * TIO PCI Bridge with no closest node information. | 168 | int e = sn_hwperf_get_nearest_node(cnode, NULL, &near_cnode); |
167 | * FIXME: Find another way to determine the closest node | 169 | |
168 | */ | 170 | if (e < 0) { |
169 | controller->node = -1; | 171 | near_cnode = (cnodeid_t)-1; /* use any node */ |
172 | printk(KERN_WARNING "pcibr_bus_fixup: failed to find " | ||
173 | "near node with CPUs to TIO node %d, err=%d\n", | ||
174 | cnode, e); | ||
175 | } | ||
176 | controller->node = near_cnode; | ||
177 | } | ||
170 | else | 178 | else |
171 | controller->node = cnode; | 179 | controller->node = cnode; |
172 | return soft; | 180 | return soft; |