From: Jiang Liu <jiang.liu@linux.intel.com>
To: "Rafael J . Wysocki" <rjw@rjwysocki.net>,
Thomas Voegtle <tv@lio96.de>, Hudd <hedede.l@gmail.com>,
Prakash Punnoor <prakash@punnoor.de>,
Francois Romieu <romieu@fr.zoreil.com>,
Dave Airlie <airlied@gmail.com>,
Marcel Holtmann <marcel@holtmann.org>,
Bjorn Helgaas <bhelgaas@google.com>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
x86@kernel.org
Cc: Jiang Liu <jiang.liu@linux.intel.com>,
LKML <linux-kernel@vger.kernel.org>,
linux-pci@vger.kernel.org, linux-acpi@vger.kernel.org,
Lv Zheng <lv.zheng@intel.com>
Subject: [Debug 1/2] x86/PCI/ACPI: Ignore resources consumed by host bridge itself
Date: Tue, 3 Mar 2015 12:25:40 +0800 [thread overview]
Message-ID: <1425356741-26789-2-git-send-email-jiang.liu@linux.intel.com> (raw)
In-Reply-To: <1425356741-26789-1-git-send-email-jiang.liu@linux.intel.com>
When parsing resources for PCI host bridge, we should ignore resources
consumed by host bridge itself and only report window resources available
to child PCI busses.
Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
---
arch/x86/pci/acpi.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/arch/x86/pci/acpi.c b/arch/x86/pci/acpi.c
index 6ac273832f28..e4695985f9de 100644
--- a/arch/x86/pci/acpi.c
+++ b/arch/x86/pci/acpi.c
@@ -331,7 +331,7 @@ static void probe_pci_root_info(struct pci_root_info *info,
struct list_head *list)
{
int ret;
- struct resource_entry *entry;
+ struct resource_entry *entry, *tmp;
sprintf(info->name, "PCI Bus %04x:%02x", domain, busnum);
info->bridge = device;
@@ -345,8 +345,13 @@ static void probe_pci_root_info(struct pci_root_info *info,
dev_dbg(&device->dev,
"no IO and memory resources present in _CRS\n");
else
- resource_list_for_each_entry(entry, list)
- entry->res->name = info->name;
+ resource_list_for_each_entry_safe(entry, tmp, list) {
+ if ((entry->res->flags & IORESOURCE_WINDOW) == 0 ||
+ (entry->res->flags & IORESOURCE_DISABLED))
+ resource_list_destroy_entry(entry);
+ else
+ entry->res->name = info->name;
+ }
}
struct pci_bus *pci_acpi_scan_root(struct acpi_pci_root *root)
--
1.7.10.4
next prev parent reply other threads:[~2015-03-03 4:23 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-03 4:25 [Debug 0/2] Fix regressions caused by commit 593669c2ac0f Jiang Liu
2015-03-03 4:25 ` Jiang Liu [this message]
2015-03-03 4:25 ` [Debug 2/2] x86/PCI/ACPI: Relax ACPI resource descriptor checks to work around BIOS bugs Jiang Liu
2015-03-03 15:18 ` Bjorn Helgaas
2015-03-04 2:29 ` Jiang Liu
2015-03-04 2:58 ` Dave Airlie
2015-03-04 11:26 ` Thomas Voegtle
2015-03-04 16:05 ` Prakash Punnoor
2015-03-04 21:31 ` Hudd
2015-03-03 4:34 ` [Debug 0/2] Fix regressions caused by commit 593669c2ac0f Dave Airlie
2015-03-03 5:02 ` Jiang Liu
2015-03-03 17:19 ` Prakash Punnoor
-- strict thread matches above, loose matches on Subject: below --
2015-03-02 8:35 [Debug 0/2] Debug PCI root resource parsing failure Thomas Voegtle
2015-03-02 9:51 ` [Debug 0/2] Debug ACPI " Jiang Liu
2015-03-02 9:51 ` [Debug 1/2] x86/PCI/ACPI: Ignore resources consumed by host bridge itself Jiang Liu
2015-02-28 10:03 regression in 4.0.0-rc1 with r8169 ethernet Thomas Voegtle
2015-03-02 4:33 ` [Debug 0/2] Debug PCI root resource parsing failure Jiang Liu
2015-03-02 4:33 ` [Debug 1/2] x86/PCI/ACPI: Ignore resources consumed by host bridge itself Jiang Liu
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=1425356741-26789-2-git-send-email-jiang.liu@linux.intel.com \
--to=jiang.liu@linux.intel.com \
--cc=airlied@gmail.com \
--cc=bhelgaas@google.com \
--cc=hedede.l@gmail.com \
--cc=hpa@zytor.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lv.zheng@intel.com \
--cc=marcel@holtmann.org \
--cc=mingo@redhat.com \
--cc=prakash@punnoor.de \
--cc=rjw@rjwysocki.net \
--cc=romieu@fr.zoreil.com \
--cc=tglx@linutronix.de \
--cc=tv@lio96.de \
--cc=x86@kernel.org \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).