From 83118b0de3a84c4728822abf6ce60bf6c8d1dbce Mon Sep 17 00:00:00 2001 From: Bob Moore Date: Wed, 30 Jul 2014 12:21:00 +0800 Subject: ACPICA: Tables: Update for DMAR table changes. Update table compiler and disassembler for new DMAR fields introduced in Sept. 2013. Note that Linux DMAR users need to be updated after applying this change. [zetalog: changing drivers/iommu/dmar.c accordingly] Cc: David Woodhouse Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki --- drivers/iommu/dmar.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'drivers/iommu') diff --git a/drivers/iommu/dmar.c b/drivers/iommu/dmar.c index 9a4f05e5b23..bbe33a81015 100644 --- a/drivers/iommu/dmar.c +++ b/drivers/iommu/dmar.c @@ -84,7 +84,7 @@ void *dmar_alloc_dev_scope(void *start, void *end, int *cnt) *cnt = 0; while (start < end) { scope = start; - if (scope->entry_type == ACPI_DMAR_SCOPE_TYPE_ACPI || + if (scope->entry_type == ACPI_DMAR_SCOPE_TYPE_NAMESPACE || scope->entry_type == ACPI_DMAR_SCOPE_TYPE_ENDPOINT || scope->entry_type == ACPI_DMAR_SCOPE_TYPE_BRIDGE) (*cnt)++; @@ -380,7 +380,7 @@ static int __init dmar_parse_one_andd(struct acpi_dmar_header *header) struct acpi_dmar_andd *andd = (void *)header; /* Check for NUL termination within the designated length */ - if (strnlen(andd->object_name, header->length - 8) == header->length - 8) { + if (strnlen(andd->device_name, header->length - 8) == header->length - 8) { WARN_TAINT(1, TAINT_FIRMWARE_WORKAROUND, "Your BIOS is broken; ANDD object name is not NUL-terminated\n" "BIOS vendor: %s; Ver: %s; Product Version: %s\n", @@ -390,7 +390,7 @@ static int __init dmar_parse_one_andd(struct acpi_dmar_header *header) return -EINVAL; } pr_info("ANDD device: %x name: %s\n", andd->device_number, - andd->object_name); + andd->device_name); return 0; } @@ -448,17 +448,17 @@ dmar_table_print_dmar_entry(struct acpi_dmar_header *header) (unsigned long long)rmrr->base_address, (unsigned long long)rmrr->end_address); break; - case ACPI_DMAR_TYPE_ATSR: + case ACPI_DMAR_TYPE_ROOT_ATS: atsr = container_of(header, struct acpi_dmar_atsr, header); pr_info("ATSR flags: %#x\n", atsr->flags); break; - case ACPI_DMAR_HARDWARE_AFFINITY: + case ACPI_DMAR_TYPE_HARDWARE_AFFINITY: rhsa = container_of(header, struct acpi_dmar_rhsa, header); pr_info("RHSA base: %#016Lx proximity domain: %#x\n", (unsigned long long)rhsa->base_address, rhsa->proximity_domain); break; - case ACPI_DMAR_TYPE_ANDD: + case ACPI_DMAR_TYPE_NAMESPACE: /* We don't print this here because we need to sanity-check it first. So print it in dmar_parse_one_andd() instead. */ break; @@ -539,15 +539,15 @@ parse_dmar_table(void) case ACPI_DMAR_TYPE_RESERVED_MEMORY: ret = dmar_parse_one_rmrr(entry_header); break; - case ACPI_DMAR_TYPE_ATSR: + case ACPI_DMAR_TYPE_ROOT_ATS: ret = dmar_parse_one_atsr(entry_header); break; - case ACPI_DMAR_HARDWARE_AFFINITY: + case ACPI_DMAR_TYPE_HARDWARE_AFFINITY: #ifdef CONFIG_ACPI_NUMA ret = dmar_parse_one_rhsa(entry_header); #endif break; - case ACPI_DMAR_TYPE_ANDD: + case ACPI_DMAR_TYPE_NAMESPACE: ret = dmar_parse_one_andd(entry_header); break; default: @@ -631,7 +631,7 @@ static void __init dmar_acpi_insert_dev_scope(u8 device_number, for (scope = (void *)(drhd + 1); (unsigned long)scope < ((unsigned long)drhd) + drhd->header.length; scope = ((void *)scope) + scope->length) { - if (scope->entry_type != ACPI_DMAR_SCOPE_TYPE_ACPI) + if (scope->entry_type != ACPI_DMAR_SCOPE_TYPE_NAMESPACE) continue; if (scope->enumeration_id != device_number) continue; @@ -666,21 +666,21 @@ static int __init dmar_acpi_dev_scope_init(void) for (andd = (void *)dmar_tbl + sizeof(struct acpi_table_dmar); ((unsigned long)andd) < ((unsigned long)dmar_tbl) + dmar_tbl->length; andd = ((void *)andd) + andd->header.length) { - if (andd->header.type == ACPI_DMAR_TYPE_ANDD) { + if (andd->header.type == ACPI_DMAR_TYPE_NAMESPACE) { acpi_handle h; struct acpi_device *adev; if (!ACPI_SUCCESS(acpi_get_handle(ACPI_ROOT_OBJECT, - andd->object_name, + andd->device_name, &h))) { pr_err("Failed to find handle for ACPI object %s\n", - andd->object_name); + andd->device_name); continue; } acpi_bus_get_device(h, &adev); if (!adev) { pr_err("Failed to get device for ACPI object %s\n", - andd->object_name); + andd->device_name); continue; } dmar_acpi_insert_dev_scope(andd->device_number, adev); -- cgit v1.2.3-70-g09d2