lkml.org 
[lkml]   [2008]   [Apr]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: + acpi-fix-bug-10124.patch added to -mm tree
On Mon, Apr 7, 2008 at 12:56 AM, Ingo Molnar <mingo@elte.hu> wrote:
>
> * Yinghai Lu <yhlu.kernel@gmail.com> wrote:
>
> > Ingo,
> >
> > A: - in x86.git/latest
> > commit 3dab95bd91b6061a887b8a199261c1d92074da85
> > Author: Yinghai Lu <yhlu.kernel@gmail.com>
> > Date: Tue Mar 4 11:34:23 2008 -0800
> >
> > ACPI: Unneccessary to scan the PCI bus already scanned.
> >
> > http://bugzilla.kernel.org/show_bug.cgi?id=10124
> >
> > is the one Yakui mentioned, but it is after
> >
> > B: - in x86.git/latest
> > commit e5491e8eb56d2e4bb0e4a6795bf0662c6703d5ac
> > Author: Yinghai Lu <Yinghai.Lu@Sun.COM>
> > Date: Tue Feb 19 03:20:09 2008 -0800
> >
> > x86: get mp_bus_to_node early
> >
> > C: - in x86.git/latest
> > commit c0f03f8c4c8dc0aa5fb5d0b791e76f6dff84a288
> > Author: Yinghai Lu <Yinghai.Lu@Sun.COM>
> > Date: Wed Feb 20 12:41:52 2008 -0800
> >
> > x86/acpi: make dev_to_node return online node
> >
> > if the A kind patch is merged to Linus tree via Andrew, we may need
> > update B and C. to make sure pci/acpi.c is same between B+C+A with new
> > A + new B + new C
>
> ok. Do you have a link/attachment for 'new A' that i could pick up into
> x86.git/latest, so that i can update to 'new B' too that you sent? While
> ACPI patches go via the ACPI tree, i'd like to track this topic
> nevertheless.

please check the attached one with changelog update.

YH
Subject: acpi: unneccessary to scan the PCI bus already scanned
From: Yakui Zhao <yakui.zhao@intel.com>

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.

Yinghai updated the changelog.

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>
Acked-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

Index: linux-2.6/arch/x86/pci/acpi.c
===================================================================
--- linux-2.6.orig/arch/x86/pci/acpi.c
+++ linux-2.6/arch/x86/pci/acpi.c
@@ -219,8 +219,21 @@ struct pci_bus * __devinit pci_acpi_scan
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
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
Index: linux-2.6/arch/ia64/pci/pci.c
===================================================================
--- linux-2.6.orig/arch/ia64/pci/pci.c
+++ linux-2.6/arch/ia64/pci/pci.c
@@ -362,7 +362,12 @@ pci_acpi_scan_root(struct acpi_device *d
info.name = name;
acpi_walk_resources(device->handle, METHOD_NAME__CRS, add_window,
&info);
-
+ /*
+ * See arch/x86/pci/acpi.c.
+ * The desired pci bus might already be scanned in a quirk. We
+ * should handle the case here, but it appears that IA64 hasn't
+ * such quirk. So we just ignore the case now.
+ */
pbus = pci_scan_bus_parented(NULL, bus, &pci_root_ops, controller);
if (pbus)
pcibios_setup_root_windows(pbus, controller);
\
 
 \ /
  Last update: 2008-04-07 20:01    [W:0.048 / U:1.424 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site