Lines Matching refs:drhd
66 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);
296 struct acpi_dmar_hardware_unit *drhd;
302 drhd = container_of(dmaru->hdr,
304 ret = dmar_insert_dev_scope(info, (void *)(drhd + 1),
305 ((void *)drhd) + drhd->header.length,
389 dmar_find_dmaru(struct acpi_dmar_hardware_unit *drhd)
395 if (dmaru->segment == drhd->segment &&
396 dmaru->reg_base_addr == drhd->address)
409 struct acpi_dmar_hardware_unit *drhd;
413 drhd = (struct acpi_dmar_hardware_unit *)header;
414 dmaru = dmar_find_dmaru(drhd);
428 dmaru->reg_base_addr = drhd->address;
429 dmaru->segment = drhd->segment;
431 dmaru->reg_size = 1UL << (drhd->size + 12);
432 dmaru->include_all = drhd->flags & 0x1; /* BIT0: INCLUDE_ALL */
433 dmaru->devices = dmar_alloc_dev_scope((void *)(drhd + 1),
434 ((void *)drhd) + drhd->header.length,
492 struct dmar_drhd_unit *drhd;
495 for_each_drhd_unit(drhd) {
496 if (drhd->reg_base_addr == rhsa->base_address) {
501 drhd->iommu->node = node;
523 struct acpi_dmar_hardware_unit *drhd;
531 drhd = container_of(header, struct acpi_dmar_hardware_unit,
534 (unsigned long long)drhd->address, drhd->flags);
702 struct acpi_dmar_hardware_unit *drhd;
708 drhd = container_of(dmaru->hdr,
713 drhd->segment == pci_domain_nr(dev->bus))
731 struct acpi_dmar_hardware_unit *drhd;
738 drhd = container_of(dmaru->hdr,
742 for (scope = (void *)(drhd + 1);
743 (unsigned long)scope < ((unsigned long)drhd) + drhd->header.length;
882 struct acpi_dmar_hardware_unit *drhd;
886 drhd = (void *)entry;
887 if (!drhd->address) {
893 addr = ioremap(drhd->address, VTD_PAGE_SIZE);
895 addr = early_ioremap(drhd->address, VTD_PAGE_SIZE);
897 pr_warn("Can't validate DRHD address: %llx\n", drhd->address);
910 warn_invalid_dmar(drhd->address, " returns all ones");
961 * @drhd: DMA remapping hardware definition structure
966 static int map_iommu(struct intel_iommu *iommu, struct dmar_drhd_unit *drhd)
968 u64 phys_addr = drhd->reg_base_addr;
972 iommu->reg_size = drhd->reg_size;
1038 static int alloc_iommu(struct dmar_drhd_unit *drhd)
1046 if (!drhd->reg_base_addr) {
1064 err = map_iommu(iommu, drhd);
1075 drhd->ignored = 1;
1078 if (!drhd->ignored) {
1083 drhd->ignored = 1;
1086 if (!drhd->ignored) {
1091 drhd->ignored = 1;
1097 iommu->segment = drhd->segment;
1104 (unsigned long long)drhd->reg_base_addr,
1135 if (intel_iommu_enabled && !drhd->ignored) {
1149 drhd->iommu = iommu;
1150 iommu->drhd = drhd;
1168 if (intel_iommu_enabled && !iommu->drhd->ignored) {
2103 struct dmar_drhd_unit *drhd;
2109 for_each_iommu(iommu, drhd) {
2115 (unsigned long long)drhd->reg_base_addr, ret);