|
@@ -219,8 +219,21 @@ struct pci_bus * __devinit pci_acpi_scan_root(struct acpi_device *device, int do
|
|
|
if (pxm >= 0)
|
|
|
sd->node = pxm_to_node(pxm);
|
|
|
#endif
|
|
|
+ /*
|
|
|
+ * Maybe the desired pci bus has been already scanned. In such case
|
|
|
+ * it is unnecessary to scan the pci bus with the given domain,busnum.
|
|
|
+ */
|
|
|
+ bus = pci_find_bus(domain, busnum);
|
|
|
+ if (bus) {
|
|
|
+ /*
|
|
|
+ * If the desired bus exits, the content of bus->sysdata will
|
|
|
+ * be replaced by sd.
|
|
|
+ */
|
|
|
+ memcpy(bus->sysdata, sd, sizeof(*sd));
|
|
|
+ kfree(sd);
|
|
|
+ } else
|
|
|
+ bus = pci_scan_bus_parented(NULL, busnum, &pci_root_ops, sd);
|
|
|
|
|
|
- bus = pci_scan_bus_parented(NULL, busnum, &pci_root_ops, sd);
|
|
|
if (!bus)
|
|
|
kfree(sd);
|
|
|
|
|
@@ -228,7 +241,7 @@ struct pci_bus * __devinit pci_acpi_scan_root(struct acpi_device *device, int do
|
|
|
if (bus != NULL) {
|
|
|
if (pxm >= 0) {
|
|
|
printk("bus %d -> pxm %d -> node %d\n",
|
|
|
- busnum, pxm, sd->node);
|
|
|
+ busnum, pxm, pxm_to_node(pxm));
|
|
|
}
|
|
|
}
|
|
|
#endif
|