summaryrefslogtreecommitdiffstats
path: root/drivers/iommu
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2014-07-30 00:21:00 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-07-30 18:50:23 -0400
commit83118b0de3a84c4728822abf6ce60bf6c8d1dbce (patch)
treeee0e1210501b1fc5146525b7ea51c5e46cfb9baa /drivers/iommu
parentb95dd1753123071fcfe34457ed4f9429c75d5ec9 (diff)
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 <dwmw2@infradead.org> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/iommu')
-rw-r--r--drivers/iommu/dmar.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/drivers/iommu/dmar.c b/drivers/iommu/dmar.c
index 9a4f05e5b23f..bbe33a81015c 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)
84 *cnt = 0; 84 *cnt = 0;
85 while (start < end) { 85 while (start < end) {
86 scope = start; 86 scope = start;
87 if (scope->entry_type == ACPI_DMAR_SCOPE_TYPE_ACPI || 87 if (scope->entry_type == ACPI_DMAR_SCOPE_TYPE_NAMESPACE ||
88 scope->entry_type == ACPI_DMAR_SCOPE_TYPE_ENDPOINT || 88 scope->entry_type == ACPI_DMAR_SCOPE_TYPE_ENDPOINT ||
89 scope->entry_type == ACPI_DMAR_SCOPE_TYPE_BRIDGE) 89 scope->entry_type == ACPI_DMAR_SCOPE_TYPE_BRIDGE)
90 (*cnt)++; 90 (*cnt)++;
@@ -380,7 +380,7 @@ static int __init dmar_parse_one_andd(struct acpi_dmar_header *header)
380 struct acpi_dmar_andd *andd = (void *)header; 380 struct acpi_dmar_andd *andd = (void *)header;
381 381
382 /* Check for NUL termination within the designated length */ 382 /* Check for NUL termination within the designated length */
383 if (strnlen(andd->object_name, header->length - 8) == header->length - 8) { 383 if (strnlen(andd->device_name, header->length - 8) == header->length - 8) {
384 WARN_TAINT(1, TAINT_FIRMWARE_WORKAROUND, 384 WARN_TAINT(1, TAINT_FIRMWARE_WORKAROUND,
385 "Your BIOS is broken; ANDD object name is not NUL-terminated\n" 385 "Your BIOS is broken; ANDD object name is not NUL-terminated\n"
386 "BIOS vendor: %s; Ver: %s; Product Version: %s\n", 386 "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)
390 return -EINVAL; 390 return -EINVAL;
391 } 391 }
392 pr_info("ANDD device: %x name: %s\n", andd->device_number, 392 pr_info("ANDD device: %x name: %s\n", andd->device_number,
393 andd->object_name); 393 andd->device_name);
394 394
395 return 0; 395 return 0;
396} 396}
@@ -448,17 +448,17 @@ dmar_table_print_dmar_entry(struct acpi_dmar_header *header)
448 (unsigned long long)rmrr->base_address, 448 (unsigned long long)rmrr->base_address,
449 (unsigned long long)rmrr->end_address); 449 (unsigned long long)rmrr->end_address);
450 break; 450 break;
451 case ACPI_DMAR_TYPE_ATSR: 451 case ACPI_DMAR_TYPE_ROOT_ATS:
452 atsr = container_of(header, struct acpi_dmar_atsr, header); 452 atsr = container_of(header, struct acpi_dmar_atsr, header);
453 pr_info("ATSR flags: %#x\n", atsr->flags); 453 pr_info("ATSR flags: %#x\n", atsr->flags);
454 break; 454 break;
455 case ACPI_DMAR_HARDWARE_AFFINITY: 455 case ACPI_DMAR_TYPE_HARDWARE_AFFINITY:
456 rhsa = container_of(header, struct acpi_dmar_rhsa, header); 456 rhsa = container_of(header, struct acpi_dmar_rhsa, header);
457 pr_info("RHSA base: %#016Lx proximity domain: %#x\n", 457 pr_info("RHSA base: %#016Lx proximity domain: %#x\n",
458 (unsigned long long)rhsa->base_address, 458 (unsigned long long)rhsa->base_address,
459 rhsa->proximity_domain); 459 rhsa->proximity_domain);
460 break; 460 break;
461 case ACPI_DMAR_TYPE_ANDD: 461 case ACPI_DMAR_TYPE_NAMESPACE:
462 /* We don't print this here because we need to sanity-check 462 /* We don't print this here because we need to sanity-check
463 it first. So print it in dmar_parse_one_andd() instead. */ 463 it first. So print it in dmar_parse_one_andd() instead. */
464 break; 464 break;
@@ -539,15 +539,15 @@ parse_dmar_table(void)
539 case ACPI_DMAR_TYPE_RESERVED_MEMORY: 539 case ACPI_DMAR_TYPE_RESERVED_MEMORY:
540 ret = dmar_parse_one_rmrr(entry_header); 540 ret = dmar_parse_one_rmrr(entry_header);
541 break; 541 break;
542 case ACPI_DMAR_TYPE_ATSR: 542 case ACPI_DMAR_TYPE_ROOT_ATS:
543 ret = dmar_parse_one_atsr(entry_header); 543 ret = dmar_parse_one_atsr(entry_header);
544 break; 544 break;
545 case ACPI_DMAR_HARDWARE_AFFINITY: 545 case ACPI_DMAR_TYPE_HARDWARE_AFFINITY:
546#ifdef CONFIG_ACPI_NUMA 546#ifdef CONFIG_ACPI_NUMA
547 ret = dmar_parse_one_rhsa(entry_header); 547 ret = dmar_parse_one_rhsa(entry_header);
548#endif 548#endif
549 break; 549 break;
550 case ACPI_DMAR_TYPE_ANDD: 550 case ACPI_DMAR_TYPE_NAMESPACE:
551 ret = dmar_parse_one_andd(entry_header); 551 ret = dmar_parse_one_andd(entry_header);
552 break; 552 break;
553 default: 553 default:
@@ -631,7 +631,7 @@ static void __init dmar_acpi_insert_dev_scope(u8 device_number,
631 for (scope = (void *)(drhd + 1); 631 for (scope = (void *)(drhd + 1);
632 (unsigned long)scope < ((unsigned long)drhd) + drhd->header.length; 632 (unsigned long)scope < ((unsigned long)drhd) + drhd->header.length;
633 scope = ((void *)scope) + scope->length) { 633 scope = ((void *)scope) + scope->length) {
634 if (scope->entry_type != ACPI_DMAR_SCOPE_TYPE_ACPI) 634 if (scope->entry_type != ACPI_DMAR_SCOPE_TYPE_NAMESPACE)
635 continue; 635 continue;
636 if (scope->enumeration_id != device_number) 636 if (scope->enumeration_id != device_number)
637 continue; 637 continue;
@@ -666,21 +666,21 @@ static int __init dmar_acpi_dev_scope_init(void)
666 for (andd = (void *)dmar_tbl + sizeof(struct acpi_table_dmar); 666 for (andd = (void *)dmar_tbl + sizeof(struct acpi_table_dmar);
667 ((unsigned long)andd) < ((unsigned long)dmar_tbl) + dmar_tbl->length; 667 ((unsigned long)andd) < ((unsigned long)dmar_tbl) + dmar_tbl->length;
668 andd = ((void *)andd) + andd->header.length) { 668 andd = ((void *)andd) + andd->header.length) {
669 if (andd->header.type == ACPI_DMAR_TYPE_ANDD) { 669 if (andd->header.type == ACPI_DMAR_TYPE_NAMESPACE) {
670 acpi_handle h; 670 acpi_handle h;
671 struct acpi_device *adev; 671 struct acpi_device *adev;
672 672
673 if (!ACPI_SUCCESS(acpi_get_handle(ACPI_ROOT_OBJECT, 673 if (!ACPI_SUCCESS(acpi_get_handle(ACPI_ROOT_OBJECT,
674 andd->object_name, 674 andd->device_name,
675 &h))) { 675 &h))) {
676 pr_err("Failed to find handle for ACPI object %s\n", 676 pr_err("Failed to find handle for ACPI object %s\n",
677 andd->object_name); 677 andd->device_name);
678 continue; 678 continue;
679 } 679 }
680 acpi_bus_get_device(h, &adev); 680 acpi_bus_get_device(h, &adev);
681 if (!adev) { 681 if (!adev) {
682 pr_err("Failed to get device for ACPI object %s\n", 682 pr_err("Failed to get device for ACPI object %s\n",
683 andd->object_name); 683 andd->device_name);
684 continue; 684 continue;
685 } 685 }
686 dmar_acpi_insert_dev_scope(andd->device_number, adev); 686 dmar_acpi_insert_dev_scope(andd->device_number, adev);