Lines Matching refs:drhd

75 static int alloc_iommu(struct dmar_drhd_unit *drhd);
78 static void dmar_register_drhd_unit(struct dmar_drhd_unit *drhd) in dmar_register_drhd_unit() argument
84 if (drhd->include_all) in dmar_register_drhd_unit()
85 list_add_tail_rcu(&drhd->list, &dmar_drhd_units); in dmar_register_drhd_unit()
87 list_add_rcu(&drhd->list, &dmar_drhd_units); in dmar_register_drhd_unit()
289 struct acpi_dmar_hardware_unit *drhd; in dmar_pci_bus_add_dev() local
295 drhd = container_of(dmaru->hdr, in dmar_pci_bus_add_dev()
297 ret = dmar_insert_dev_scope(info, (void *)(drhd + 1), in dmar_pci_bus_add_dev()
298 ((void *)drhd) + drhd->header.length, in dmar_pci_bus_add_dev()
357 dmar_find_dmaru(struct acpi_dmar_hardware_unit *drhd) in dmar_find_dmaru() argument
362 if (dmaru->segment == drhd->segment && in dmar_find_dmaru()
363 dmaru->reg_base_addr == drhd->address) in dmar_find_dmaru()
376 struct acpi_dmar_hardware_unit *drhd; in dmar_parse_one_drhd() local
380 drhd = (struct acpi_dmar_hardware_unit *)header; in dmar_parse_one_drhd()
381 dmaru = dmar_find_dmaru(drhd); in dmar_parse_one_drhd()
395 dmaru->reg_base_addr = drhd->address; in dmar_parse_one_drhd()
396 dmaru->segment = drhd->segment; in dmar_parse_one_drhd()
397 dmaru->include_all = drhd->flags & 0x1; /* BIT0: INCLUDE_ALL */ in dmar_parse_one_drhd()
398 dmaru->devices = dmar_alloc_dev_scope((void *)(drhd + 1), in dmar_parse_one_drhd()
399 ((void *)drhd) + drhd->header.length, in dmar_parse_one_drhd()
456 struct dmar_drhd_unit *drhd; in dmar_parse_one_rhsa() local
459 for_each_drhd_unit(drhd) { in dmar_parse_one_rhsa()
460 if (drhd->reg_base_addr == rhsa->base_address) { in dmar_parse_one_rhsa()
465 drhd->iommu->node = node; in dmar_parse_one_rhsa()
473 drhd->reg_base_addr, in dmar_parse_one_rhsa()
487 struct acpi_dmar_hardware_unit *drhd; in dmar_table_print_dmar_entry() local
494 drhd = container_of(header, struct acpi_dmar_hardware_unit, in dmar_table_print_dmar_entry()
497 (unsigned long long)drhd->address, drhd->flags); in dmar_table_print_dmar_entry()
660 struct acpi_dmar_hardware_unit *drhd; in dmar_find_matched_drhd_unit() local
666 drhd = container_of(dmaru->hdr, in dmar_find_matched_drhd_unit()
671 drhd->segment == pci_domain_nr(dev->bus)) in dmar_find_matched_drhd_unit()
689 struct acpi_dmar_hardware_unit *drhd; in dmar_acpi_insert_dev_scope() local
696 drhd = container_of(dmaru->hdr, in dmar_acpi_insert_dev_scope()
700 for (scope = (void *)(drhd + 1); in dmar_acpi_insert_dev_scope()
701 (unsigned long)scope < ((unsigned long)drhd) + drhd->header.length; in dmar_acpi_insert_dev_scope()
835 struct acpi_dmar_hardware_unit *drhd; in dmar_validate_one_drhd() local
839 drhd = (void *)entry; in dmar_validate_one_drhd()
840 if (!drhd->address) { in dmar_validate_one_drhd()
846 addr = ioremap(drhd->address, VTD_PAGE_SIZE); in dmar_validate_one_drhd()
848 addr = early_ioremap(drhd->address, VTD_PAGE_SIZE); in dmar_validate_one_drhd()
850 pr_warn("IOMMU: can't validate: %llx\n", drhd->address); in dmar_validate_one_drhd()
863 warn_invalid_dmar(drhd->address, " returns all ones"); in dmar_validate_one_drhd()
999 static int alloc_iommu(struct dmar_drhd_unit *drhd) in alloc_iommu() argument
1007 if (!drhd->reg_base_addr) { in alloc_iommu()
1022 err = map_iommu(iommu, drhd->reg_base_addr); in alloc_iommu()
1043 iommu->segment = drhd->segment; in alloc_iommu()
1050 (unsigned long long)drhd->reg_base_addr, in alloc_iommu()
1066 drhd->iommu = iommu; in alloc_iommu()
1670 struct dmar_drhd_unit *drhd; in enable_drhd_fault_handling() local
1676 for_each_iommu(iommu, drhd) { in enable_drhd_fault_handling()
1682 (unsigned long long)drhd->reg_base_addr, ret); in enable_drhd_fault_handling()