Commit 3f166dae authored by Robin Murphy's avatar Robin Murphy Committed by Joerg Roedel
Browse files

iommu/amd: Drop IOVA cookie management

parent 46983fcd
Loading
Loading
Loading
Loading
+0 −12
Original line number Diff line number Diff line
@@ -1918,16 +1918,7 @@ static struct iommu_domain *amd_iommu_domain_alloc(unsigned type)
	domain->domain.geometry.aperture_end   = ~0ULL;
	domain->domain.geometry.force_aperture = true;

	if (type == IOMMU_DOMAIN_DMA &&
	    iommu_get_dma_cookie(&domain->domain) == -ENOMEM)
		goto free_domain;

	return &domain->domain;

free_domain:
	protection_domain_free(domain);

	return NULL;
}

static void amd_iommu_domain_free(struct iommu_domain *dom)
@@ -1944,9 +1935,6 @@ static void amd_iommu_domain_free(struct iommu_domain *dom)
	if (!dom)
		return;

	if (dom->type == IOMMU_DOMAIN_DMA)
		iommu_put_dma_cookie(&domain->domain);

	if (domain->flags & PD_IOMMUV2_MASK)
		free_gcr3_table(domain);