diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/ia64/pci/pci.c | 7 | ||||
-rw-r--r-- | arch/x86/pci/acpi.c | 17 |
2 files changed, 21 insertions, 3 deletions
diff --git a/arch/ia64/pci/pci.c b/arch/ia64/pci/pci.c index e282c348dcde..53d0a8ee35d7 100644 --- a/arch/ia64/pci/pci.c +++ b/arch/ia64/pci/pci.c | |||
@@ -362,7 +362,12 @@ pci_acpi_scan_root(struct acpi_device *device, int domain, int bus) | |||
362 | info.name = name; | 362 | info.name = name; |
363 | acpi_walk_resources(device->handle, METHOD_NAME__CRS, add_window, | 363 | acpi_walk_resources(device->handle, METHOD_NAME__CRS, add_window, |
364 | &info); | 364 | &info); |
365 | 365 | /* | |
366 | * See arch/x86/pci/acpi.c. | ||
367 | * The desired pci bus might already be scanned in a quirk. We | ||
368 | * should handle the case here, but it appears that IA64 hasn't | ||
369 | * such quirk. So we just ignore the case now. | ||
370 | */ | ||
366 | pbus = pci_scan_bus_parented(NULL, bus, &pci_root_ops, controller); | 371 | pbus = pci_scan_bus_parented(NULL, bus, &pci_root_ops, controller); |
367 | if (pbus) | 372 | if (pbus) |
368 | pcibios_setup_root_windows(pbus, controller); | 373 | pcibios_setup_root_windows(pbus, controller); |
diff --git a/arch/x86/pci/acpi.c b/arch/x86/pci/acpi.c index 0234f2831bf3..378136fb5044 100644 --- a/arch/x86/pci/acpi.c +++ b/arch/x86/pci/acpi.c | |||
@@ -219,8 +219,21 @@ struct pci_bus * __devinit pci_acpi_scan_root(struct acpi_device *device, int do | |||
219 | if (pxm >= 0) | 219 | if (pxm >= 0) |
220 | sd->node = pxm_to_node(pxm); | 220 | sd->node = pxm_to_node(pxm); |
221 | #endif | 221 | #endif |
222 | /* | ||
223 | * 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. | ||
225 | */ | ||
226 | bus = pci_find_bus(domain, busnum); | ||
227 | if (bus) { | ||
228 | /* | ||
229 | * If the desired bus exits, the content of bus->sysdata will | ||
230 | * be replaced by sd. | ||
231 | */ | ||
232 | memcpy(bus->sysdata, sd, sizeof(*sd)); | ||
233 | kfree(sd); | ||
234 | } else | ||
235 | bus = pci_scan_bus_parented(NULL, busnum, &pci_root_ops, sd); | ||
222 | 236 | ||
223 | bus = pci_scan_bus_parented(NULL, busnum, &pci_root_ops, sd); | ||
224 | if (!bus) | 237 | if (!bus) |
225 | kfree(sd); | 238 | kfree(sd); |
226 | 239 | ||
@@ -228,7 +241,7 @@ struct pci_bus * __devinit pci_acpi_scan_root(struct acpi_device *device, int do | |||
228 | if (bus != NULL) { | 241 | if (bus != NULL) { |
229 | if (pxm >= 0) { | 242 | if (pxm >= 0) { |
230 | printk("bus %d -> pxm %d -> node %d\n", | 243 | printk("bus %d -> pxm %d -> node %d\n", |
231 | busnum, pxm, sd->node); | 244 | busnum, pxm, pxm_to_node(pxm)); |
232 | } | 245 | } |
233 | } | 246 | } |
234 | #endif | 247 | #endif |