Lines Matching refs:drhd

64 static int alloc_iommu(struct dmar_drhd_unit *drhd);
69 static void dmar_register_drhd_unit(struct dmar_drhd_unit *drhd)
75 if (drhd->include_all)
76 list_add_tail_rcu(&drhd->list, &dmar_drhd_units);
78 list_add_rcu(&drhd->list, &dmar_drhd_units);
299 struct acpi_dmar_hardware_unit *drhd;
305 drhd = container_of(dmaru->hdr,
307 ret = dmar_insert_dev_scope(info, (void *)(drhd + 1),
308 ((void *)drhd) + drhd->header.length,
392 dmar_find_dmaru(struct acpi_dmar_hardware_unit *drhd)
398 if (dmaru->segment == drhd->segment &&
399 dmaru->reg_base_addr == drhd->address)
412 struct acpi_dmar_hardware_unit *drhd;
416 drhd = (struct acpi_dmar_hardware_unit *)header;
417 dmaru = dmar_find_dmaru(drhd);
431 dmaru->reg_base_addr = drhd->address;
432 dmaru->segment = drhd->segment;
433 dmaru->include_all = drhd->flags & 0x1; /* BIT0: INCLUDE_ALL */
434 dmaru->devices = dmar_alloc_dev_scope((void *)(drhd + 1),
435 ((void *)drhd) + drhd->header.length,
493 struct dmar_drhd_unit *drhd;
496 for_each_drhd_unit(drhd) {
497 if (drhd->reg_base_addr == rhsa->base_address) {
502 drhd->iommu->node = node;
524 struct acpi_dmar_hardware_unit *drhd;
531 drhd = container_of(header, struct acpi_dmar_hardware_unit,
534 (unsigned long long)drhd->address, drhd->flags);
697 struct acpi_dmar_hardware_unit *drhd;
703 drhd = container_of(dmaru->hdr,
708 drhd->segment == pci_domain_nr(dev->bus))
726 struct acpi_dmar_hardware_unit *drhd;
733 drhd = container_of(dmaru->hdr,
737 for (scope = (void *)(drhd + 1);
738 (unsigned long)scope < ((unsigned long)drhd) + drhd->header.length;
876 struct acpi_dmar_hardware_unit *drhd;
880 drhd = (void *)entry;
881 if (!drhd->address) {
887 addr = ioremap(drhd->address, VTD_PAGE_SIZE);
889 addr = early_ioremap(drhd->address, VTD_PAGE_SIZE);
891 pr_warn("Can't validate DRHD address: %llx\n", drhd->address);
904 warn_invalid_dmar(drhd->address, " returns all ones");
1047 static int alloc_iommu(struct dmar_drhd_unit *drhd)
1055 if (!drhd->reg_base_addr) {
1070 err = map_iommu(iommu, drhd->reg_base_addr);
1080 drhd->ignored = 1;
1083 if (!drhd->ignored) {
1088 drhd->ignored = 1;
1091 if (!drhd->ignored) {
1096 drhd->ignored = 1;
1102 iommu->segment = drhd->segment;
1109 (unsigned long long)drhd->reg_base_addr,
1130 if (intel_iommu_enabled && !drhd->ignored) {
1144 drhd->iommu = iommu;
1145 iommu->drhd = drhd;
1162 if (intel_iommu_enabled && !iommu->drhd->ignored) {
1969 struct dmar_drhd_unit *drhd;
1975 for_each_iommu(iommu, drhd) {
1981 (unsigned long long)drhd->reg_base_addr, ret);