All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiang Liu <jiang.liu@linux.intel.com>
To: Thomas Voegtle <tv@lio96.de>, 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>,
	"Rafael J . Wysocki" <rjw@rjwysocki.net>,
	Dave Airlie <airlied@gmail.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: Mon,  2 Mar 2015 17:51:37 +0800	[thread overview]
Message-ID: <1425289898-22377-2-git-send-email-jiang.liu@linux.intel.com> (raw)
In-Reply-To: <1425289898-22377-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 |   10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/arch/x86/pci/acpi.c b/arch/x86/pci/acpi.c
index 6ac273832f28..ddafc9e8b9b3 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,12 @@ 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)
+				entry->res->name = info->name;
+			else
+				resource_list_destroy_entry(entry);
+		}
 }
 
 struct pci_bus *pci_acpi_scan_root(struct acpi_pci_root *root)
-- 
1.7.10.4

  reply	other threads:[~2015-03-02  9:51 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-25  3:47 regression in 4.0.0-rc1 with r8169 ethernet Dave Airlie
2015-02-25  5:46 ` Bjorn Helgaas
2015-02-25  7:10 ` Bjorn Helgaas
2015-02-25  8:03   ` Dave Airlie
2015-02-25 22:42     ` Rafael J. Wysocki
2015-02-27 14:50     ` Thomas Voegtle
2015-02-27 22:24       ` Rafael J. Wysocki
2015-02-28  8:06         ` Jiang Liu
2015-02-28  8:36           ` Marcel Holtmann
2015-02-28  8:45             ` Jiang Liu
2015-02-28 10:03           ` 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
2015-03-02  4:33               ` [Debug 2/2] x86/PCI/ACPI: Gather debug info Jiang Liu
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                   ` Jiang Liu [this message]
2015-03-02  9:51                   ` [Debug 2/2] x86/PCI/ACPI: Gather debug info Jiang Liu
2015-03-02 11:52                   ` [Debug 0/2] Debug ACPI resource parsing failure Thomas Voegtle
2015-02-28  8:43   ` regression in 4.0.0-rc1 with r8169 ethernet Jiang Liu
  -- strict thread matches above, loose matches on Subject: below --
2015-03-03  4:25 [Debug 0/2] Fix regressions caused by commit 593669c2ac0f Jiang Liu
2015-03-03  4:25 ` [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=1425289898-22377-2-git-send-email-jiang.liu@linux.intel.com \
    --to=jiang.liu@linux.intel.com \
    --cc=airlied@gmail.com \
    --cc=bhelgaas@google.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=mingo@redhat.com \
    --cc=rjw@rjwysocki.net \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.