LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: "Yinghai Lu" <yhlu.kernel@gmail.com>
To: "Ingo Molnar" <mingo@elte.hu>
Cc: "Greg KH" <gregkh@suse.de>, "Muli Ben-Yehuda" <muli@il.ibm.com>,
"Zhao Yakui" <yakui.zhao@intel.com>,
lenb@kernel.org, linux-acpi@vger.kernel.org,
"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] ACPI: Unneccessary to scan the PCI bus already scanned.
Date: Tue, 4 Mar 2008 11:34:23 -0800 [thread overview]
Message-ID: <86802c440803041134t45c4e2b3yd6ee0f9f32298c55@mail.gmail.com> (raw)
In-Reply-To: <86802c440803041128g16a2cf8chdf8c87f5f24742a1@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 204 bytes --]
On Tue, Mar 4, 2008 at 11:28 AM, Yinghai Lu <yhlu.kernel@gmail.com> wrote:
> I updated Yakui's patch, so it could be applied after x86.git#testing
>
> Please check it
>
> YH
use this v2 one please
YH
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: acpi_scan_root_after_v2.patch --]
[-- Type: text/x-patch; name=acpi_scan_root_after_v2.patch, Size: 2478 bytes --]
From : Zhao Yakui <yakui.zhao@intel.com>
[PATCH] Unneccessary to scan the PCI bus already scanned v2
http://bugzilla.kernel.org/show_bug.cgi?id=10124
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.
that replace pcibios_scan_root by pci_scan_bus_parented...
but in pcibios_scan_root we have check about scanned bus
Yinghai make it can be applied after patches in x86.git#tesing
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Li Shaohua <shaohua.li@intel.com>
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
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
@@ -218,28 +218,36 @@ struct pci_bus * __devinit pci_acpi_scan
node = -1;
#endif
- /* Allocate per-root-bus (not per bus) arch-specific data.
- * TODO: leak; this memory is never freed.
- * It's arguable whether it's worth the trouble to care.
- */
- sd = kzalloc(sizeof(*sd), GFP_KERNEL);
- if (!sd) {
- printk(KERN_ERR "PCI: OOM, not probing PCI bus %02x\n", busnum);
- return NULL;
- }
+ bus = pci_find_bus(domain, busnum);
+ if (bus) {
+ /* already scanned ?*/
+ sd = bus->sysdata;
+ sd->node = node;
+ } else {
+ /* Allocate per-root-bus (not per bus) arch-specific data.
+ * TODO: leak; this memory is never freed.
+ * It's arguable whether it's worth the trouble to care.
+ */
+ sd = kzalloc(sizeof(*sd), GFP_KERNEL);
+ if (!sd) {
+ printk(KERN_ERR "PCI: OOM, not probing PCI bus %02x\n",
+ busnum);
+ return NULL;
+ }
- sd->domain = domain;
- sd->node = node;
+ sd->domain = domain;
+ sd->node = node;
- bus = pci_scan_bus_parented(NULL, busnum, &pci_root_ops, sd);
- if (!bus)
- kfree(sd);
+ bus = pci_scan_bus_parented(NULL, busnum, &pci_root_ops, sd);
+ if (!bus)
+ kfree(sd);
+ }
#ifdef CONFIG_ACPI_NUMA
if (bus) {
if (pxm >= 0) {
printk(KERN_DEBUG "bus %02x -> pxm %d -> node %d\n",
- busnum, pxm, sd->node);
+ busnum, pxm, node);
}
}
#endif
next prev parent reply other threads:[~2008-03-04 19:34 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1204525186.4080.11.camel@yakui_zhao.sh.intel.com>
[not found] ` <20080303073214.GA5934@elte.hu>
[not found] ` <86802c440803030006m1879838awc238f07bc98ed43e@mail.gmail.com>
[not found] ` <86802c440803030030p4ff9cec5tdb25d1cdc131d377@mail.gmail.com>
2008-03-03 10:01 ` Yinghai Lu
2008-03-03 10:10 ` Ingo Molnar
2008-03-03 10:33 ` Yinghai Lu
2008-03-03 11:11 ` Ingo Molnar
2008-03-03 18:57 ` Yinghai Lu
2008-03-04 19:28 ` Yinghai Lu
2008-03-04 19:34 ` Yinghai Lu [this message]
2008-03-04 21:23 ` Ingo Molnar
2008-03-03 10:11 ` Ingo Molnar
2008-03-03 10:30 ` Yinghai Lu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86802c440803041134t45c4e2b3yd6ee0f9f32298c55@mail.gmail.com \
--to=yhlu.kernel@gmail.com \
--cc=gregkh@suse.de \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=muli@il.ibm.com \
--cc=yakui.zhao@intel.com \
--subject='Re: [PATCH] ACPI: Unneccessary to scan the PCI bus already scanned.' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).