summaryrefslogtreecommitdiffstats
path: root/drivers/pci/dmar.c
diff options
context:
space:
mode:
authorDavid Woodhouse <David.Woodhouse@intel.com>2009-10-07 12:18:00 +0100
committerDavid Woodhouse <David.Woodhouse@intel.com>2009-10-07 12:18:00 +0100
commitaa697079ee66315c4b9747a5eb3e48487fb1b8be (patch)
tree4e34bf80f0257c1462a5e0602de62812dc77ee01 /drivers/pci/dmar.c
parent4c923d4714821cf32ff115bb9c91867dff711972 (diff)
downloadop-kernel-dev-aa697079ee66315c4b9747a5eb3e48487fb1b8be.zip
op-kernel-dev-aa697079ee66315c4b9747a5eb3e48487fb1b8be.tar.gz
dmar: Fix build failure without NUMA, warn on bogus RHSA tables and don't abort
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/pci/dmar.c')
-rw-r--r--drivers/pci/dmar.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/drivers/pci/dmar.c b/drivers/pci/dmar.c
index 63aa529..0d064d1 100644
--- a/drivers/pci/dmar.c
+++ b/drivers/pci/dmar.c
@@ -348,6 +348,7 @@ found:
}
#endif
+#ifdef CONFIG_ACPI_NUMA
static int __init
dmar_parse_one_rhsa(struct acpi_dmar_header *header)
{
@@ -355,18 +356,26 @@ dmar_parse_one_rhsa(struct acpi_dmar_header *header)
struct dmar_drhd_unit *drhd;
rhsa = (struct acpi_dmar_rhsa *)header;
- for_each_drhd_unit(drhd)
+ for_each_drhd_unit(drhd) {
if (drhd->reg_base_addr == rhsa->base_address) {
int node = acpi_map_pxm_to_node(rhsa->proximity_domain);
if (!node_online(node))
node = -1;
drhd->iommu->node = node;
- return 0;
+ return 0;
+ }
}
+ WARN(1, "Your BIOS is broken; RHSA refers to non-existent DMAR unit at %llx\n"
+ "BIOS vendor: %s; Ver: %s; Product Version: %s\n",
+ drhd->reg_base_addr,
+ dmi_get_system_info(DMI_BIOS_VENDOR),
+ dmi_get_system_info(DMI_BIOS_VERSION),
+ dmi_get_system_info(DMI_PRODUCT_VERSION));
- return -ENODEV;
+ return 0;
}
+#endif
static void __init
dmar_table_print_dmar_entry(struct acpi_dmar_header *header)
@@ -487,7 +496,9 @@ parse_dmar_table(void)
#endif
break;
case ACPI_DMAR_HARDWARE_AFFINITY:
+#ifdef CONFIG_ACPI_NUMA
ret = dmar_parse_one_rhsa(entry_header);
+#endif
break;
default:
printk(KERN_WARNING PREFIX
OpenPOWER on IntegriCloud