Skip to content

Commit 63f1789

Browse files
Jiang Liurafaeljw
authored andcommitted
x86/PCI/ACPI: Ignore resources consumed by host bridge itself
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. Fixes: 593669c (x86/PCI/ACPI: Use common ACPI resource interfaces ...) Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent f1651a2 commit 63f1789

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

arch/x86/pci/acpi.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ static void probe_pci_root_info(struct pci_root_info *info,
331331
struct list_head *list)
332332
{
333333
int ret;
334-
struct resource_entry *entry;
334+
struct resource_entry *entry, *tmp;
335335

336336
sprintf(info->name, "PCI Bus %04x:%02x", domain, busnum);
337337
info->bridge = device;
@@ -345,8 +345,13 @@ static void probe_pci_root_info(struct pci_root_info *info,
345345
dev_dbg(&device->dev,
346346
"no IO and memory resources present in _CRS\n");
347347
else
348-
resource_list_for_each_entry(entry, list)
349-
entry->res->name = info->name;
348+
resource_list_for_each_entry_safe(entry, tmp, list) {
349+
if ((entry->res->flags & IORESOURCE_WINDOW) == 0 ||
350+
(entry->res->flags & IORESOURCE_DISABLED))
351+
resource_list_destroy_entry(entry);
352+
else
353+
entry->res->name = info->name;
354+
}
350355
}
351356

352357
struct pci_bus *pci_acpi_scan_root(struct acpi_pci_root *root)

0 commit comments

Comments
 (0)