diff options
Diffstat (limited to 'drivers/pci/dmar.c')
-rw-r--r-- | drivers/pci/dmar.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/drivers/pci/dmar.c b/drivers/pci/dmar.c index 63aa52973d4d..0d064d1e840a 100644 --- a/drivers/pci/dmar.c +++ b/drivers/pci/dmar.c | |||
@@ -348,6 +348,7 @@ found: | |||
348 | } | 348 | } |
349 | #endif | 349 | #endif |
350 | 350 | ||
351 | #ifdef CONFIG_ACPI_NUMA | ||
351 | static int __init | 352 | static int __init |
352 | dmar_parse_one_rhsa(struct acpi_dmar_header *header) | 353 | dmar_parse_one_rhsa(struct acpi_dmar_header *header) |
353 | { | 354 | { |
@@ -355,18 +356,26 @@ dmar_parse_one_rhsa(struct acpi_dmar_header *header) | |||
355 | struct dmar_drhd_unit *drhd; | 356 | struct dmar_drhd_unit *drhd; |
356 | 357 | ||
357 | rhsa = (struct acpi_dmar_rhsa *)header; | 358 | rhsa = (struct acpi_dmar_rhsa *)header; |
358 | for_each_drhd_unit(drhd) | 359 | for_each_drhd_unit(drhd) { |
359 | if (drhd->reg_base_addr == rhsa->base_address) { | 360 | if (drhd->reg_base_addr == rhsa->base_address) { |
360 | int node = acpi_map_pxm_to_node(rhsa->proximity_domain); | 361 | int node = acpi_map_pxm_to_node(rhsa->proximity_domain); |
361 | 362 | ||
362 | if (!node_online(node)) | 363 | if (!node_online(node)) |
363 | node = -1; | 364 | node = -1; |
364 | drhd->iommu->node = node; | 365 | drhd->iommu->node = node; |
365 | return 0; | 366 | return 0; |
367 | } | ||
366 | } | 368 | } |
369 | WARN(1, "Your BIOS is broken; RHSA refers to non-existent DMAR unit at %llx\n" | ||
370 | "BIOS vendor: %s; Ver: %s; Product Version: %s\n", | ||
371 | drhd->reg_base_addr, | ||
372 | dmi_get_system_info(DMI_BIOS_VENDOR), | ||
373 | dmi_get_system_info(DMI_BIOS_VERSION), | ||
374 | dmi_get_system_info(DMI_PRODUCT_VERSION)); | ||
367 | 375 | ||
368 | return -ENODEV; | 376 | return 0; |
369 | } | 377 | } |
378 | #endif | ||
370 | 379 | ||
371 | static void __init | 380 | static void __init |
372 | dmar_table_print_dmar_entry(struct acpi_dmar_header *header) | 381 | dmar_table_print_dmar_entry(struct acpi_dmar_header *header) |
@@ -487,7 +496,9 @@ parse_dmar_table(void) | |||
487 | #endif | 496 | #endif |
488 | break; | 497 | break; |
489 | case ACPI_DMAR_HARDWARE_AFFINITY: | 498 | case ACPI_DMAR_HARDWARE_AFFINITY: |
499 | #ifdef CONFIG_ACPI_NUMA | ||
490 | ret = dmar_parse_one_rhsa(entry_header); | 500 | ret = dmar_parse_one_rhsa(entry_header); |
501 | #endif | ||
491 | break; | 502 | break; |
492 | default: | 503 | default: |
493 | printk(KERN_WARNING PREFIX | 504 | printk(KERN_WARNING PREFIX |