Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

yakui.zhao@intel.com and committed by
Linus Torvalds
b87e81e5 5f1a3f2a

+21 -3
+6 -1
arch/ia64/pci/pci.c
··· 362 362 info.name = name; 363 363 acpi_walk_resources(device->handle, METHOD_NAME__CRS, add_window, 364 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 371 pbus = pci_scan_bus_parented(NULL, bus, &pci_root_ops, controller); 367 372 if (pbus) 368 373 pcibios_setup_root_windows(pbus, controller);
+15 -2
arch/x86/pci/acpi.c
··· 219 219 if (pxm >= 0) 220 220 sd->node = pxm_to_node(pxm); 221 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 237 if (!bus) 225 238 kfree(sd); 226 239 ··· 241 228 if (bus != NULL) { 242 229 if (pxm >= 0) { 243 230 printk("bus %d -> pxm %d -> node %d\n", 244 - busnum, pxm, sd->node); 231 + busnum, pxm, pxm_to_node(pxm)); 245 232 } 246 233 } 247 234 #endif