Lines Matching refs:drhd
74 static int alloc_iommu(struct dmar_drhd_unit *drhd);
79 static void dmar_register_drhd_unit(struct dmar_drhd_unit *drhd) in dmar_register_drhd_unit() argument
85 if (drhd->include_all) in dmar_register_drhd_unit()
86 list_add_tail_rcu(&drhd->list, &dmar_drhd_units); in dmar_register_drhd_unit()
88 list_add_rcu(&drhd->list, &dmar_drhd_units); in dmar_register_drhd_unit()
302 struct acpi_dmar_hardware_unit *drhd; in dmar_pci_bus_add_dev() local
308 drhd = container_of(dmaru->hdr, in dmar_pci_bus_add_dev()
310 ret = dmar_insert_dev_scope(info, (void *)(drhd + 1), in dmar_pci_bus_add_dev()
311 ((void *)drhd) + drhd->header.length, in dmar_pci_bus_add_dev()
373 dmar_find_dmaru(struct acpi_dmar_hardware_unit *drhd) in dmar_find_dmaru() argument
378 if (dmaru->segment == drhd->segment && in dmar_find_dmaru()
379 dmaru->reg_base_addr == drhd->address) in dmar_find_dmaru()
392 struct acpi_dmar_hardware_unit *drhd; in dmar_parse_one_drhd() local
396 drhd = (struct acpi_dmar_hardware_unit *)header; in dmar_parse_one_drhd()
397 dmaru = dmar_find_dmaru(drhd); in dmar_parse_one_drhd()
411 dmaru->reg_base_addr = drhd->address; in dmar_parse_one_drhd()
412 dmaru->segment = drhd->segment; in dmar_parse_one_drhd()
413 dmaru->include_all = drhd->flags & 0x1; /* BIT0: INCLUDE_ALL */ in dmar_parse_one_drhd()
414 dmaru->devices = dmar_alloc_dev_scope((void *)(drhd + 1), in dmar_parse_one_drhd()
415 ((void *)drhd) + drhd->header.length, in dmar_parse_one_drhd()
472 struct dmar_drhd_unit *drhd; in dmar_parse_one_rhsa() local
475 for_each_drhd_unit(drhd) { in dmar_parse_one_rhsa()
476 if (drhd->reg_base_addr == rhsa->base_address) { in dmar_parse_one_rhsa()
481 drhd->iommu->node = node; in dmar_parse_one_rhsa()
489 drhd->reg_base_addr, in dmar_parse_one_rhsa()
503 struct acpi_dmar_hardware_unit *drhd; in dmar_table_print_dmar_entry() local
510 drhd = container_of(header, struct acpi_dmar_hardware_unit, in dmar_table_print_dmar_entry()
513 (unsigned long long)drhd->address, drhd->flags); in dmar_table_print_dmar_entry()
676 struct acpi_dmar_hardware_unit *drhd; in dmar_find_matched_drhd_unit() local
682 drhd = container_of(dmaru->hdr, in dmar_find_matched_drhd_unit()
687 drhd->segment == pci_domain_nr(dev->bus)) in dmar_find_matched_drhd_unit()
705 struct acpi_dmar_hardware_unit *drhd; in dmar_acpi_insert_dev_scope() local
712 drhd = container_of(dmaru->hdr, in dmar_acpi_insert_dev_scope()
716 for (scope = (void *)(drhd + 1); in dmar_acpi_insert_dev_scope()
717 (unsigned long)scope < ((unsigned long)drhd) + drhd->header.length; in dmar_acpi_insert_dev_scope()
854 struct acpi_dmar_hardware_unit *drhd; in dmar_validate_one_drhd() local
858 drhd = (void *)entry; in dmar_validate_one_drhd()
859 if (!drhd->address) { in dmar_validate_one_drhd()
865 addr = ioremap(drhd->address, VTD_PAGE_SIZE); in dmar_validate_one_drhd()
867 addr = early_ioremap(drhd->address, VTD_PAGE_SIZE); in dmar_validate_one_drhd()
869 pr_warn("Can't validate DRHD address: %llx\n", drhd->address); in dmar_validate_one_drhd()
882 warn_invalid_dmar(drhd->address, " returns all ones"); in dmar_validate_one_drhd()
1019 static int alloc_iommu(struct dmar_drhd_unit *drhd) in alloc_iommu() argument
1027 if (!drhd->reg_base_addr) { in alloc_iommu()
1042 err = map_iommu(iommu, drhd->reg_base_addr); in alloc_iommu()
1063 iommu->segment = drhd->segment; in alloc_iommu()
1070 (unsigned long long)drhd->reg_base_addr, in alloc_iommu()
1100 drhd->iommu = iommu; in alloc_iommu()
1714 struct dmar_drhd_unit *drhd; in enable_drhd_fault_handling() local
1720 for_each_iommu(iommu, drhd) { in enable_drhd_fault_handling()
1726 (unsigned long long)drhd->reg_base_addr, ret); in enable_drhd_fault_handling()