aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/pci/acpi.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/pci/acpi.c')
-rw-r--r--arch/x86/pci/acpi.c27
1 files changed, 17 insertions, 10 deletions
diff --git a/arch/x86/pci/acpi.c b/arch/x86/pci/acpi.c
index 2664cb3fc96c..1a9c0c6a1a18 100644
--- a/arch/x86/pci/acpi.c
+++ b/arch/x86/pci/acpi.c
@@ -191,7 +191,10 @@ struct pci_bus * __devinit pci_acpi_scan_root(struct acpi_device *device, int do
191{ 191{
192 struct pci_bus *bus; 192 struct pci_bus *bus;
193 struct pci_sysdata *sd; 193 struct pci_sysdata *sd;
194 int node;
195#ifdef CONFIG_ACPI_NUMA
194 int pxm; 196 int pxm;
197#endif
195 198
196 dmi_check_system(acpi_pciprobe_dmi_table); 199 dmi_check_system(acpi_pciprobe_dmi_table);
197 200
@@ -201,6 +204,17 @@ struct pci_bus * __devinit pci_acpi_scan_root(struct acpi_device *device, int do
201 return NULL; 204 return NULL;
202 } 205 }
203 206
207 node = -1;
208#ifdef CONFIG_ACPI_NUMA
209 pxm = acpi_get_pxm(device->handle);
210 if (pxm >= 0)
211 node = pxm_to_node(pxm);
212 if (node != -1)
213 set_mp_bus_to_node(busnum, node);
214 else
215 node = get_mp_bus_to_node(busnum);
216#endif
217
204 /* Allocate per-root-bus (not per bus) arch-specific data. 218 /* Allocate per-root-bus (not per bus) arch-specific data.
205 * TODO: leak; this memory is never freed. 219 * TODO: leak; this memory is never freed.
206 * It's arguable whether it's worth the trouble to care. 220 * It's arguable whether it's worth the trouble to care.
@@ -212,13 +226,7 @@ struct pci_bus * __devinit pci_acpi_scan_root(struct acpi_device *device, int do
212 } 226 }
213 227
214 sd->domain = domain; 228 sd->domain = domain;
215 sd->node = -1; 229 sd->node = node;
216
217 pxm = acpi_get_pxm(device->handle);
218#ifdef CONFIG_ACPI_NUMA
219 if (pxm >= 0)
220 sd->node = pxm_to_node(pxm);
221#endif
222 /* 230 /*
223 * Maybe the desired pci bus has been already scanned. In such case 231 * Maybe the desired pci bus has been already scanned. In such case
224 * it is unnecessary to scan the pci bus with the given domain,busnum. 232 * it is unnecessary to scan the pci bus with the given domain,busnum.
@@ -238,9 +246,9 @@ struct pci_bus * __devinit pci_acpi_scan_root(struct acpi_device *device, int do
238 kfree(sd); 246 kfree(sd);
239 247
240#ifdef CONFIG_ACPI_NUMA 248#ifdef CONFIG_ACPI_NUMA
241 if (bus != NULL) { 249 if (bus) {
242 if (pxm >= 0) { 250 if (pxm >= 0) {
243 printk("bus %d -> pxm %d -> node %d\n", 251 printk(KERN_DEBUG "bus %02x -> pxm %d -> node %d\n",
244 busnum, pxm, pxm_to_node(pxm)); 252 busnum, pxm, pxm_to_node(pxm));
245 } 253 }
246 } 254 }
@@ -248,7 +256,6 @@ struct pci_bus * __devinit pci_acpi_scan_root(struct acpi_device *device, int do
248 256
249 if (bus && (pci_probe & PCI_USE__CRS)) 257 if (bus && (pci_probe & PCI_USE__CRS))
250 get_current_resources(device, busnum, domain, bus); 258 get_current_resources(device, busnum, domain, bus);
251
252 return bus; 259 return bus;
253} 260}
254 261