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()
358 dmar_find_dmaru(struct acpi_dmar_hardware_unit *drhd) in dmar_find_dmaru() argument
363 if (dmaru->segment == drhd->segment && in dmar_find_dmaru()
364 dmaru->reg_base_addr == drhd->address) in dmar_find_dmaru()
377 struct acpi_dmar_hardware_unit *drhd; in dmar_parse_one_drhd() local
381 drhd = (struct acpi_dmar_hardware_unit *)header; in dmar_parse_one_drhd()
382 dmaru = dmar_find_dmaru(drhd); in dmar_parse_one_drhd()
396 dmaru->reg_base_addr = drhd->address; in dmar_parse_one_drhd()
397 dmaru->segment = drhd->segment; in dmar_parse_one_drhd()
398 dmaru->include_all = drhd->flags & 0x1; /* BIT0: INCLUDE_ALL */ in dmar_parse_one_drhd()
399 dmaru->devices = dmar_alloc_dev_scope((void *)(drhd + 1), in dmar_parse_one_drhd()
400 ((void *)drhd) + drhd->header.length, in dmar_parse_one_drhd()
457 struct dmar_drhd_unit *drhd; in dmar_parse_one_rhsa() local
460 for_each_drhd_unit(drhd) { in dmar_parse_one_rhsa()
461 if (drhd->reg_base_addr == rhsa->base_address) { in dmar_parse_one_rhsa()
466 drhd->iommu->node = node; in dmar_parse_one_rhsa()
474 drhd->reg_base_addr, in dmar_parse_one_rhsa()
488 struct acpi_dmar_hardware_unit *drhd; in dmar_table_print_dmar_entry() local
495 drhd = container_of(header, struct acpi_dmar_hardware_unit, in dmar_table_print_dmar_entry()
498 (unsigned long long)drhd->address, drhd->flags); in dmar_table_print_dmar_entry()
661 struct acpi_dmar_hardware_unit *drhd; in dmar_find_matched_drhd_unit() local
667 drhd = container_of(dmaru->hdr, in dmar_find_matched_drhd_unit()
672 drhd->segment == pci_domain_nr(dev->bus)) in dmar_find_matched_drhd_unit()
690 struct acpi_dmar_hardware_unit *drhd; in dmar_acpi_insert_dev_scope() local
697 drhd = container_of(dmaru->hdr, in dmar_acpi_insert_dev_scope()
701 for (scope = (void *)(drhd + 1); in dmar_acpi_insert_dev_scope()
702 (unsigned long)scope < ((unsigned long)drhd) + drhd->header.length; in dmar_acpi_insert_dev_scope()
836 struct acpi_dmar_hardware_unit *drhd; in dmar_validate_one_drhd() local
840 drhd = (void *)entry; in dmar_validate_one_drhd()
841 if (!drhd->address) { in dmar_validate_one_drhd()
847 addr = ioremap(drhd->address, VTD_PAGE_SIZE); in dmar_validate_one_drhd()
849 addr = early_ioremap(drhd->address, VTD_PAGE_SIZE); in dmar_validate_one_drhd()
851 pr_warn("Can't validate DRHD address: %llx\n", drhd->address); in dmar_validate_one_drhd()
864 warn_invalid_dmar(drhd->address, " returns all ones"); in dmar_validate_one_drhd()
1000 static int alloc_iommu(struct dmar_drhd_unit *drhd) in alloc_iommu() argument
1008 if (!drhd->reg_base_addr) { in alloc_iommu()
1023 err = map_iommu(iommu, drhd->reg_base_addr); in alloc_iommu()
1044 iommu->segment = drhd->segment; in alloc_iommu()
1051 (unsigned long long)drhd->reg_base_addr, in alloc_iommu()
1067 drhd->iommu = iommu; in alloc_iommu()
1682 struct dmar_drhd_unit *drhd; in enable_drhd_fault_handling() local
1688 for_each_iommu(iommu, drhd) { in enable_drhd_fault_handling()
1694 (unsigned long long)drhd->reg_base_addr, ret); in enable_drhd_fault_handling()