aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/pci/acpi.c
diff options
context:
space:
mode:
authoryakui.zhao@intel.com <yakui.zhao@intel.com>2008-04-15 17:34:49 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-15 22:35:41 -0400
commitb87e81e5c6e64ae0eae3b4f61bf07bfeec856184 (patch)
tree0220bd679f3e8403a917d5038d1f026214f8548b /arch/x86/pci/acpi.c
parent5f1a3f2ac4ddf966cd0555dc445c6df65709c580 (diff)
acpi: unneccessary to scan the PCI bus already scanned
http://bugzilla.kernel.org/show_bug.cgi?id=10124 this change: commit 08f1c192c3c32797068bfe97738babb3295bbf42 Author: Muli Ben-Yehuda <muli@il.ibm.com> Date: Sun Jul 22 00:23:39 2007 +0300 x86-64: introduce struct pci_sysdata to facilitate sharing of ->sysdata This patch introduces struct pci_sysdata to x86 and x86-64, and converts the existing two users (NUMA, Calgary) to use it. This lays the groundwork for having other users of sysdata, such as the PCI domains work. The Calgary bits are tested, the NUMA bits just look ok. replaces pcibios_scan_root by pci_scan_bus_parented... but in pcibios_scan_root we have a check about scanned busses. Cc: <yakui.zhao@intel.com> Cc: Stian Jordet <stian@jordet.net> Cc: Len Brown <lenb@kernel.org> Cc: Greg KH <greg@kroah.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: "Yinghai Lu" <yhlu.kernel@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/x86/pci/acpi.c')
-rw-r--r--arch/x86/pci/acpi.c17
1 files changed, 15 insertions, 2 deletions
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