diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2015-03-05 17:14:40 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2015-03-05 17:14:40 -0500 |
commit | 8204680c7b7efd7217a2606f57657988c74256aa (patch) | |
tree | e684e32369780990e19ea45228b8cf73133a054d | |
parent | 13a7a6ac0a11197edcd0f756a035f472b42cdf8b (diff) | |
parent | aa714d286f2ea5fae3ca8c75acd03d8694fb657e (diff) |
Merge branch 'acpi-resources'
* acpi-resources:
x86/PCI/ACPI: Relax ACPI resource descriptor checks to work around BIOS bugs
x86/PCI/ACPI: Ignore resources consumed by host bridge itself
PCI: versatile: Update for list_for_each_entry() API change
-rw-r--r-- | arch/x86/pci/acpi.c | 11 | ||||
-rw-r--r-- | drivers/acpi/resource.c | 4 | ||||
-rw-r--r-- | drivers/pci/host/pci-versatile.c | 2 |
3 files changed, 12 insertions, 5 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, | |||
331 | struct list_head *list) | 331 | struct list_head *list) |
332 | { | 332 | { |
333 | int ret; | 333 | int ret; |
334 | struct resource_entry *entry; | 334 | struct resource_entry *entry, *tmp; |
335 | 335 | ||
336 | sprintf(info->name, "PCI Bus %04x:%02x", domain, busnum); | 336 | sprintf(info->name, "PCI Bus %04x:%02x", domain, busnum); |
337 | info->bridge = device; | 337 | info->bridge = device; |
@@ -345,8 +345,13 @@ static void probe_pci_root_info(struct pci_root_info *info, | |||
345 | dev_dbg(&device->dev, | 345 | dev_dbg(&device->dev, |
346 | "no IO and memory resources present in _CRS\n"); | 346 | "no IO and memory resources present in _CRS\n"); |
347 | else | 347 | else |
348 | resource_list_for_each_entry(entry, list) | 348 | resource_list_for_each_entry_safe(entry, tmp, list) { |
349 | entry->res->name = info->name; | 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 | } | ||
350 | } | 355 | } |
351 | 356 | ||
352 | struct pci_bus *pci_acpi_scan_root(struct acpi_pci_root *root) | 357 | struct pci_bus *pci_acpi_scan_root(struct acpi_pci_root *root) |
diff --git a/drivers/acpi/resource.c b/drivers/acpi/resource.c index c723668e3e27..5589a6e2a023 100644 --- a/drivers/acpi/resource.c +++ b/drivers/acpi/resource.c | |||
@@ -42,8 +42,10 @@ static bool acpi_dev_resource_len_valid(u64 start, u64 end, u64 len, bool io) | |||
42 | * CHECKME: len might be required to check versus a minimum | 42 | * CHECKME: len might be required to check versus a minimum |
43 | * length as well. 1 for io is fine, but for memory it does | 43 | * length as well. 1 for io is fine, but for memory it does |
44 | * not make any sense at all. | 44 | * not make any sense at all. |
45 | * Note: some BIOSes report incorrect length for ACPI address space | ||
46 | * descriptor, so remove check of 'reslen == len' to avoid regression. | ||
45 | */ | 47 | */ |
46 | if (len && reslen && reslen == len && start <= end) | 48 | if (len && reslen && start <= end) |
47 | return true; | 49 | return true; |
48 | 50 | ||
49 | pr_debug("ACPI: invalid or unassigned resource %s [%016llx - %016llx] length [%016llx]\n", | 51 | pr_debug("ACPI: invalid or unassigned resource %s [%016llx - %016llx] length [%016llx]\n", |
diff --git a/drivers/pci/host/pci-versatile.c b/drivers/pci/host/pci-versatile.c index 1ec694a52379..464bf492ee2a 100644 --- a/drivers/pci/host/pci-versatile.c +++ b/drivers/pci/host/pci-versatile.c | |||
@@ -80,7 +80,7 @@ static int versatile_pci_parse_request_of_pci_ranges(struct device *dev, | |||
80 | if (err) | 80 | if (err) |
81 | return err; | 81 | return err; |
82 | 82 | ||
83 | resource_list_for_each_entry(win, res, list) { | 83 | resource_list_for_each_entry(win, res) { |
84 | struct resource *parent, *res = win->res; | 84 | struct resource *parent, *res = win->res; |
85 | 85 | ||
86 | switch (resource_type(res)) { | 86 | switch (resource_type(res)) { |