Lines Matching refs:drhd

63 static int alloc_iommu(struct dmar_drhd_unit *drhd);
68 static void dmar_register_drhd_unit(struct dmar_drhd_unit *drhd) in dmar_register_drhd_unit() argument
74 if (drhd->include_all) in dmar_register_drhd_unit()
75 list_add_tail_rcu(&drhd->list, &dmar_drhd_units); in dmar_register_drhd_unit()
77 list_add_rcu(&drhd->list, &dmar_drhd_units); in dmar_register_drhd_unit()
291 struct acpi_dmar_hardware_unit *drhd; in dmar_pci_bus_add_dev() local
297 drhd = container_of(dmaru->hdr, in dmar_pci_bus_add_dev()
299 ret = dmar_insert_dev_scope(info, (void *)(drhd + 1), in dmar_pci_bus_add_dev()
300 ((void *)drhd) + drhd->header.length, in dmar_pci_bus_add_dev()
362 dmar_find_dmaru(struct acpi_dmar_hardware_unit *drhd) in dmar_find_dmaru() argument
367 if (dmaru->segment == drhd->segment && in dmar_find_dmaru()
368 dmaru->reg_base_addr == drhd->address) in dmar_find_dmaru()
381 struct acpi_dmar_hardware_unit *drhd; in dmar_parse_one_drhd() local
385 drhd = (struct acpi_dmar_hardware_unit *)header; in dmar_parse_one_drhd()
386 dmaru = dmar_find_dmaru(drhd); in dmar_parse_one_drhd()
400 dmaru->reg_base_addr = drhd->address; in dmar_parse_one_drhd()
401 dmaru->segment = drhd->segment; in dmar_parse_one_drhd()
402 dmaru->include_all = drhd->flags & 0x1; /* BIT0: INCLUDE_ALL */ in dmar_parse_one_drhd()
403 dmaru->devices = dmar_alloc_dev_scope((void *)(drhd + 1), in dmar_parse_one_drhd()
404 ((void *)drhd) + drhd->header.length, in dmar_parse_one_drhd()
461 struct dmar_drhd_unit *drhd; in dmar_parse_one_rhsa() local
464 for_each_drhd_unit(drhd) { in dmar_parse_one_rhsa()
465 if (drhd->reg_base_addr == rhsa->base_address) { in dmar_parse_one_rhsa()
470 drhd->iommu->node = node; in dmar_parse_one_rhsa()
478 drhd->reg_base_addr, in dmar_parse_one_rhsa()
492 struct acpi_dmar_hardware_unit *drhd; in dmar_table_print_dmar_entry() local
499 drhd = container_of(header, struct acpi_dmar_hardware_unit, in dmar_table_print_dmar_entry()
502 (unsigned long long)drhd->address, drhd->flags); in dmar_table_print_dmar_entry()
665 struct acpi_dmar_hardware_unit *drhd; in dmar_find_matched_drhd_unit() local
671 drhd = container_of(dmaru->hdr, in dmar_find_matched_drhd_unit()
676 drhd->segment == pci_domain_nr(dev->bus)) in dmar_find_matched_drhd_unit()
694 struct acpi_dmar_hardware_unit *drhd; in dmar_acpi_insert_dev_scope() local
701 drhd = container_of(dmaru->hdr, in dmar_acpi_insert_dev_scope()
705 for (scope = (void *)(drhd + 1); in dmar_acpi_insert_dev_scope()
706 (unsigned long)scope < ((unsigned long)drhd) + drhd->header.length; in dmar_acpi_insert_dev_scope()
843 struct acpi_dmar_hardware_unit *drhd; in dmar_validate_one_drhd() local
847 drhd = (void *)entry; in dmar_validate_one_drhd()
848 if (!drhd->address) { in dmar_validate_one_drhd()
854 addr = ioremap(drhd->address, VTD_PAGE_SIZE); in dmar_validate_one_drhd()
856 addr = early_ioremap(drhd->address, VTD_PAGE_SIZE); in dmar_validate_one_drhd()
858 pr_warn("Can't validate DRHD address: %llx\n", drhd->address); in dmar_validate_one_drhd()
871 warn_invalid_dmar(drhd->address, " returns all ones"); in dmar_validate_one_drhd()
1008 static int alloc_iommu(struct dmar_drhd_unit *drhd) in alloc_iommu() argument
1016 if (!drhd->reg_base_addr) { in alloc_iommu()
1031 err = map_iommu(iommu, drhd->reg_base_addr); in alloc_iommu()
1052 iommu->segment = drhd->segment; in alloc_iommu()
1059 (unsigned long long)drhd->reg_base_addr, in alloc_iommu()
1089 drhd->iommu = iommu; in alloc_iommu()
1803 struct dmar_drhd_unit *drhd; in enable_drhd_fault_handling() local
1809 for_each_iommu(iommu, drhd) { in enable_drhd_fault_handling()
1815 (unsigned long long)drhd->reg_base_addr, ret); in enable_drhd_fault_handling()