diff options
Diffstat (limited to 'arch/x86/pci/acpi.c')
-rw-r--r-- | arch/x86/pci/acpi.c | 50 |
1 files changed, 44 insertions, 6 deletions
diff --git a/arch/x86/pci/acpi.c b/arch/x86/pci/acpi.c index 68c3c139520..f8348ab1032 100644 --- a/arch/x86/pci/acpi.c +++ b/arch/x86/pci/acpi.c | |||
@@ -43,6 +43,17 @@ static const struct dmi_system_id pci_use_crs_table[] __initconst = { | |||
43 | DMI_MATCH(DMI_PRODUCT_NAME, "ALiveSATA2-GLAN"), | 43 | DMI_MATCH(DMI_PRODUCT_NAME, "ALiveSATA2-GLAN"), |
44 | }, | 44 | }, |
45 | }, | 45 | }, |
46 | /* https://bugzilla.kernel.org/show_bug.cgi?id=30552 */ | ||
47 | /* 2006 AMD HT/VIA system with two host bridges */ | ||
48 | { | ||
49 | .callback = set_use_crs, | ||
50 | .ident = "ASUS M2V-MX SE", | ||
51 | .matches = { | ||
52 | DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."), | ||
53 | DMI_MATCH(DMI_BOARD_NAME, "M2V-MX SE"), | ||
54 | DMI_MATCH(DMI_BIOS_VENDOR, "American Megatrends Inc."), | ||
55 | }, | ||
56 | }, | ||
46 | {} | 57 | {} |
47 | }; | 58 | }; |
48 | 59 | ||
@@ -138,7 +149,7 @@ setup_resource(struct acpi_resource *acpi_res, void *data) | |||
138 | struct acpi_resource_address64 addr; | 149 | struct acpi_resource_address64 addr; |
139 | acpi_status status; | 150 | acpi_status status; |
140 | unsigned long flags; | 151 | unsigned long flags; |
141 | u64 start, end; | 152 | u64 start, orig_end, end; |
142 | 153 | ||
143 | status = resource_to_addr(acpi_res, &addr); | 154 | status = resource_to_addr(acpi_res, &addr); |
144 | if (!ACPI_SUCCESS(status)) | 155 | if (!ACPI_SUCCESS(status)) |
@@ -154,7 +165,21 @@ setup_resource(struct acpi_resource *acpi_res, void *data) | |||
154 | return AE_OK; | 165 | return AE_OK; |
155 | 166 | ||
156 | start = addr.minimum + addr.translation_offset; | 167 | start = addr.minimum + addr.translation_offset; |
157 | end = addr.maximum + addr.translation_offset; | 168 | orig_end = end = addr.maximum + addr.translation_offset; |
169 | |||
170 | /* Exclude non-addressable range or non-addressable portion of range */ | ||
171 | end = min(end, (u64)iomem_resource.end); | ||
172 | if (end <= start) { | ||
173 | dev_info(&info->bridge->dev, | ||
174 | "host bridge window [%#llx-%#llx] " | ||
175 | "(ignored, not CPU addressable)\n", start, orig_end); | ||
176 | return AE_OK; | ||
177 | } else if (orig_end != end) { | ||
178 | dev_info(&info->bridge->dev, | ||
179 | "host bridge window [%#llx-%#llx] " | ||
180 | "([%#llx-%#llx] ignored, not CPU addressable)\n", | ||
181 | start, orig_end, end + 1, orig_end); | ||
182 | } | ||
158 | 183 | ||
159 | res = &info->res[info->res_num]; | 184 | res = &info->res[info->res_num]; |
160 | res->name = info->name; | 185 | res->name = info->name; |
@@ -246,10 +271,9 @@ static void add_resources(struct pci_root_info *info) | |||
246 | 271 | ||
247 | conflict = insert_resource_conflict(root, res); | 272 | conflict = insert_resource_conflict(root, res); |
248 | if (conflict) | 273 | if (conflict) |
249 | dev_err(&info->bridge->dev, | 274 | dev_info(&info->bridge->dev, |
250 | "address space collision: host bridge window %pR " | 275 | "ignoring host bridge window %pR (conflicts with %s %pR)\n", |
251 | "conflicts with %s %pR\n", | 276 | res, conflict->name, conflict); |
252 | res, conflict->name, conflict); | ||
253 | else | 277 | else |
254 | pci_bus_add_resource(info->bus, res, 0); | 278 | pci_bus_add_resource(info->bus, res, 0); |
255 | } | 279 | } |
@@ -361,6 +385,20 @@ struct pci_bus * __devinit pci_acpi_scan_root(struct acpi_pci_root *root) | |||
361 | } | 385 | } |
362 | } | 386 | } |
363 | 387 | ||
388 | /* After the PCI-E bus has been walked and all devices discovered, | ||
389 | * configure any settings of the fabric that might be necessary. | ||
390 | */ | ||
391 | if (bus) { | ||
392 | struct pci_bus *child; | ||
393 | list_for_each_entry(child, &bus->children, node) { | ||
394 | struct pci_dev *self = child->self; | ||
395 | if (!self) | ||
396 | continue; | ||
397 | |||
398 | pcie_bus_configure_settings(child, self->pcie_mpss); | ||
399 | } | ||
400 | } | ||
401 | |||
364 | if (!bus) | 402 | if (!bus) |
365 | kfree(sd); | 403 | kfree(sd); |
366 | 404 | ||