Lines Matching refs:drhd

64 static int alloc_iommu(struct dmar_drhd_unit *drhd);
69 static void dmar_register_drhd_unit(struct dmar_drhd_unit *drhd) in dmar_register_drhd_unit() argument
75 if (drhd->include_all) in dmar_register_drhd_unit()
76 list_add_tail_rcu(&drhd->list, &dmar_drhd_units); in dmar_register_drhd_unit()
78 list_add_rcu(&drhd->list, &dmar_drhd_units); in dmar_register_drhd_unit()
299 struct acpi_dmar_hardware_unit *drhd; in dmar_pci_bus_add_dev() local
305 drhd = container_of(dmaru->hdr, in dmar_pci_bus_add_dev()
307 ret = dmar_insert_dev_scope(info, (void *)(drhd + 1), in dmar_pci_bus_add_dev()
308 ((void *)drhd) + drhd->header.length, in dmar_pci_bus_add_dev()
392 dmar_find_dmaru(struct acpi_dmar_hardware_unit *drhd) in dmar_find_dmaru() argument
398 if (dmaru->segment == drhd->segment && in dmar_find_dmaru()
399 dmaru->reg_base_addr == drhd->address) in dmar_find_dmaru()
412 struct acpi_dmar_hardware_unit *drhd; in dmar_parse_one_drhd() local
416 drhd = (struct acpi_dmar_hardware_unit *)header; in dmar_parse_one_drhd()
417 dmaru = dmar_find_dmaru(drhd); in dmar_parse_one_drhd()
431 dmaru->reg_base_addr = drhd->address; in dmar_parse_one_drhd()
432 dmaru->segment = drhd->segment; in dmar_parse_one_drhd()
433 dmaru->include_all = drhd->flags & 0x1; /* BIT0: INCLUDE_ALL */ in dmar_parse_one_drhd()
434 dmaru->devices = dmar_alloc_dev_scope((void *)(drhd + 1), in dmar_parse_one_drhd()
435 ((void *)drhd) + drhd->header.length, in dmar_parse_one_drhd()
493 struct dmar_drhd_unit *drhd; in dmar_parse_one_rhsa() local
496 for_each_drhd_unit(drhd) { in dmar_parse_one_rhsa()
497 if (drhd->reg_base_addr == rhsa->base_address) { in dmar_parse_one_rhsa()
502 drhd->iommu->node = node; in dmar_parse_one_rhsa()
524 struct acpi_dmar_hardware_unit *drhd; in dmar_table_print_dmar_entry() local
531 drhd = container_of(header, struct acpi_dmar_hardware_unit, in dmar_table_print_dmar_entry()
534 (unsigned long long)drhd->address, drhd->flags); in dmar_table_print_dmar_entry()
697 struct acpi_dmar_hardware_unit *drhd; in dmar_find_matched_drhd_unit() local
703 drhd = container_of(dmaru->hdr, in dmar_find_matched_drhd_unit()
708 drhd->segment == pci_domain_nr(dev->bus)) in dmar_find_matched_drhd_unit()
726 struct acpi_dmar_hardware_unit *drhd; in dmar_acpi_insert_dev_scope() local
733 drhd = container_of(dmaru->hdr, in dmar_acpi_insert_dev_scope()
737 for (scope = (void *)(drhd + 1); in dmar_acpi_insert_dev_scope()
738 (unsigned long)scope < ((unsigned long)drhd) + drhd->header.length; in dmar_acpi_insert_dev_scope()
876 struct acpi_dmar_hardware_unit *drhd; in dmar_validate_one_drhd() local
880 drhd = (void *)entry; in dmar_validate_one_drhd()
881 if (!drhd->address) { in dmar_validate_one_drhd()
887 addr = ioremap(drhd->address, VTD_PAGE_SIZE); in dmar_validate_one_drhd()
889 addr = early_ioremap(drhd->address, VTD_PAGE_SIZE); in dmar_validate_one_drhd()
891 pr_warn("Can't validate DRHD address: %llx\n", drhd->address); in dmar_validate_one_drhd()
904 warn_invalid_dmar(drhd->address, " returns all ones"); in dmar_validate_one_drhd()
1047 static int alloc_iommu(struct dmar_drhd_unit *drhd) in alloc_iommu() argument
1055 if (!drhd->reg_base_addr) { in alloc_iommu()
1070 err = map_iommu(iommu, drhd->reg_base_addr); in alloc_iommu()
1080 drhd->ignored = 1; in alloc_iommu()
1083 if (!drhd->ignored) { in alloc_iommu()
1088 drhd->ignored = 1; in alloc_iommu()
1091 if (!drhd->ignored) { in alloc_iommu()
1096 drhd->ignored = 1; in alloc_iommu()
1102 iommu->segment = drhd->segment; in alloc_iommu()
1109 (unsigned long long)drhd->reg_base_addr, in alloc_iommu()
1130 if (intel_iommu_enabled && !drhd->ignored) { in alloc_iommu()
1144 drhd->iommu = iommu; in alloc_iommu()
1145 iommu->drhd = drhd; in alloc_iommu()
1162 if (intel_iommu_enabled && !iommu->drhd->ignored) { in free_iommu()
1969 struct dmar_drhd_unit *drhd; in enable_drhd_fault_handling() local
1975 for_each_iommu(iommu, drhd) { in enable_drhd_fault_handling()
1981 (unsigned long long)drhd->reg_base_addr, ret); in enable_drhd_fault_handling()