diff options
Diffstat (limited to 'arch/ia64')
-rw-r--r-- | arch/ia64/pci/pci.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/arch/ia64/pci/pci.c b/arch/ia64/pci/pci.c index 720a861f88be..54d9ed444e4a 100644 --- a/arch/ia64/pci/pci.c +++ b/arch/ia64/pci/pci.c | |||
@@ -157,6 +157,7 @@ alloc_pci_controller (int seg) | |||
157 | 157 | ||
158 | memset(controller, 0, sizeof(*controller)); | 158 | memset(controller, 0, sizeof(*controller)); |
159 | controller->segment = seg; | 159 | controller->segment = seg; |
160 | controller->node = -1; | ||
160 | return controller; | 161 | return controller; |
161 | } | 162 | } |
162 | 163 | ||
@@ -288,6 +289,7 @@ pci_acpi_scan_root(struct acpi_device *device, int domain, int bus) | |||
288 | unsigned int windows = 0; | 289 | unsigned int windows = 0; |
289 | struct pci_bus *pbus; | 290 | struct pci_bus *pbus; |
290 | char *name; | 291 | char *name; |
292 | int pxm; | ||
291 | 293 | ||
292 | controller = alloc_pci_controller(domain); | 294 | controller = alloc_pci_controller(domain); |
293 | if (!controller) | 295 | if (!controller) |
@@ -295,10 +297,16 @@ pci_acpi_scan_root(struct acpi_device *device, int domain, int bus) | |||
295 | 297 | ||
296 | controller->acpi_handle = device->handle; | 298 | controller->acpi_handle = device->handle; |
297 | 299 | ||
300 | pxm = acpi_get_pxm(controller->acpi_handle); | ||
301 | #ifdef CONFIG_NUMA | ||
302 | if (pxm >= 0) | ||
303 | controller->node = pxm_to_nid_map[pxm]; | ||
304 | #endif | ||
305 | |||
298 | acpi_walk_resources(device->handle, METHOD_NAME__CRS, count_window, | 306 | acpi_walk_resources(device->handle, METHOD_NAME__CRS, count_window, |
299 | &windows); | 307 | &windows); |
300 | controller->window = kmalloc(sizeof(*controller->window) * windows, | 308 | controller->window = kmalloc_node(sizeof(*controller->window) * windows, |
301 | GFP_KERNEL); | 309 | GFP_KERNEL, controller->node); |
302 | if (!controller->window) | 310 | if (!controller->window) |
303 | goto out2; | 311 | goto out2; |
304 | 312 | ||