x86: Simplify code by removing a !SMP #ifdefs from 'struct cpuinfo_x86'
[pandora-kernel.git] / arch / x86 / pci / acpi.c
index 404f21a..0ed97d8 100644 (file)
@@ -54,6 +54,16 @@ static const struct dmi_system_id pci_use_crs_table[] __initconst = {
                        DMI_MATCH(DMI_BIOS_VENDOR, "American Megatrends Inc."),
                },
        },
+       /* https://bugzilla.kernel.org/show_bug.cgi?id=42619 */
+       {
+               .callback = set_use_crs,
+               .ident = "MSI MS-7253",
+               .matches = {
+                       DMI_MATCH(DMI_BOARD_VENDOR, "MICRO-STAR INTERNATIONAL CO., LTD"),
+                       DMI_MATCH(DMI_BOARD_NAME, "MS-7253"),
+                       DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies, LTD"),
+               },
+       },
        {}
 };
 
@@ -149,7 +159,7 @@ setup_resource(struct acpi_resource *acpi_res, void *data)
        struct acpi_resource_address64 addr;
        acpi_status status;
        unsigned long flags;
-       u64 start, end;
+       u64 start, orig_end, end;
 
        status = resource_to_addr(acpi_res, &addr);
        if (!ACPI_SUCCESS(status))
@@ -165,7 +175,21 @@ setup_resource(struct acpi_resource *acpi_res, void *data)
                return AE_OK;
 
        start = addr.minimum + addr.translation_offset;
-       end = addr.maximum + addr.translation_offset;
+       orig_end = end = addr.maximum + addr.translation_offset;
+
+       /* Exclude non-addressable range or non-addressable portion of range */
+       end = min(end, (u64)iomem_resource.end);
+       if (end <= start) {
+               dev_info(&info->bridge->dev,
+                       "host bridge window [%#llx-%#llx] "
+                       "(ignored, not CPU addressable)\n", start, orig_end);
+               return AE_OK;
+       } else if (orig_end != end) {
+               dev_info(&info->bridge->dev,
+                       "host bridge window [%#llx-%#llx] "
+                       "([%#llx-%#llx] ignored, not CPU addressable)\n",
+                       start, orig_end, end + 1, orig_end);
+       }
 
        res = &info->res[info->res_num];
        res->name = info->name;