Lines Matching refs:drhd
66 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()
296 struct acpi_dmar_hardware_unit *drhd; in dmar_pci_bus_add_dev() local
302 drhd = container_of(dmaru->hdr, in dmar_pci_bus_add_dev()
304 ret = dmar_insert_dev_scope(info, (void *)(drhd + 1), in dmar_pci_bus_add_dev()
305 ((void *)drhd) + drhd->header.length, in dmar_pci_bus_add_dev()
389 dmar_find_dmaru(struct acpi_dmar_hardware_unit *drhd) in dmar_find_dmaru() argument
395 if (dmaru->segment == drhd->segment && in dmar_find_dmaru()
396 dmaru->reg_base_addr == drhd->address) in dmar_find_dmaru()
409 struct acpi_dmar_hardware_unit *drhd; in dmar_parse_one_drhd() local
413 drhd = (struct acpi_dmar_hardware_unit *)header; in dmar_parse_one_drhd()
414 dmaru = dmar_find_dmaru(drhd); in dmar_parse_one_drhd()
428 dmaru->reg_base_addr = drhd->address; in dmar_parse_one_drhd()
429 dmaru->segment = drhd->segment; in dmar_parse_one_drhd()
431 dmaru->reg_size = 1UL << (drhd->size + 12); in dmar_parse_one_drhd()
432 dmaru->include_all = drhd->flags & 0x1; /* BIT0: INCLUDE_ALL */ in dmar_parse_one_drhd()
433 dmaru->devices = dmar_alloc_dev_scope((void *)(drhd + 1), in dmar_parse_one_drhd()
434 ((void *)drhd) + drhd->header.length, in dmar_parse_one_drhd()
492 struct dmar_drhd_unit *drhd; in dmar_parse_one_rhsa() local
495 for_each_drhd_unit(drhd) { in dmar_parse_one_rhsa()
496 if (drhd->reg_base_addr == rhsa->base_address) { in dmar_parse_one_rhsa()
501 drhd->iommu->node = node; in dmar_parse_one_rhsa()
523 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()
702 struct acpi_dmar_hardware_unit *drhd; in dmar_find_matched_drhd_unit() local
708 drhd = container_of(dmaru->hdr, in dmar_find_matched_drhd_unit()
713 drhd->segment == pci_domain_nr(dev->bus)) in dmar_find_matched_drhd_unit()
731 struct acpi_dmar_hardware_unit *drhd; in dmar_acpi_insert_dev_scope() local
738 drhd = container_of(dmaru->hdr, in dmar_acpi_insert_dev_scope()
742 for (scope = (void *)(drhd + 1); in dmar_acpi_insert_dev_scope()
743 (unsigned long)scope < ((unsigned long)drhd) + drhd->header.length; in dmar_acpi_insert_dev_scope()
882 struct acpi_dmar_hardware_unit *drhd; in dmar_validate_one_drhd() local
886 drhd = (void *)entry; in dmar_validate_one_drhd()
887 if (!drhd->address) { in dmar_validate_one_drhd()
893 addr = ioremap(drhd->address, VTD_PAGE_SIZE); in dmar_validate_one_drhd()
895 addr = early_ioremap(drhd->address, VTD_PAGE_SIZE); in dmar_validate_one_drhd()
897 pr_warn("Can't validate DRHD address: %llx\n", drhd->address); in dmar_validate_one_drhd()
910 warn_invalid_dmar(drhd->address, " returns all ones"); in dmar_validate_one_drhd()
966 static int map_iommu(struct intel_iommu *iommu, struct dmar_drhd_unit *drhd) in map_iommu() argument
968 u64 phys_addr = drhd->reg_base_addr; in map_iommu()
972 iommu->reg_size = drhd->reg_size; in map_iommu()
1038 static int alloc_iommu(struct dmar_drhd_unit *drhd) in alloc_iommu() argument
1046 if (!drhd->reg_base_addr) { in alloc_iommu()
1064 err = map_iommu(iommu, drhd); in alloc_iommu()
1075 drhd->ignored = 1; in alloc_iommu()
1078 if (!drhd->ignored) { in alloc_iommu()
1083 drhd->ignored = 1; in alloc_iommu()
1086 if (!drhd->ignored) { in alloc_iommu()
1091 drhd->ignored = 1; in alloc_iommu()
1097 iommu->segment = drhd->segment; in alloc_iommu()
1104 (unsigned long long)drhd->reg_base_addr, in alloc_iommu()
1135 if (intel_iommu_enabled && !drhd->ignored) { in alloc_iommu()
1149 drhd->iommu = iommu; in alloc_iommu()
1150 iommu->drhd = drhd; in alloc_iommu()
1168 if (intel_iommu_enabled && !iommu->drhd->ignored) { in free_iommu()
2085 struct dmar_drhd_unit *drhd; in enable_drhd_fault_handling() local
2091 for_each_iommu(iommu, drhd) { in enable_drhd_fault_handling()
2097 (unsigned long long)drhd->reg_base_addr, ret); in enable_drhd_fault_handling()