Skip to content

Commit 3f166da

Browse files
rmurphy-armjoergroedel
authored andcommitted
iommu/amd: Drop IOVA cookie management
The core code bakes its own cookies now. Signed-off-by: Robin Murphy <[email protected]> Link: https://lore.kernel.org/r/648e74e7422caa6a7db7fb0c36813c7bd2007af8.1628682048.git.robin.murphy@arm.com Signed-off-by: Joerg Roedel <[email protected]>
1 parent 46983fc commit 3f166da

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

drivers/iommu/amd/iommu.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1918,16 +1918,7 @@ static struct iommu_domain *amd_iommu_domain_alloc(unsigned type)
19181918
domain->domain.geometry.aperture_end = ~0ULL;
19191919
domain->domain.geometry.force_aperture = true;
19201920

1921-
if (type == IOMMU_DOMAIN_DMA &&
1922-
iommu_get_dma_cookie(&domain->domain) == -ENOMEM)
1923-
goto free_domain;
1924-
19251921
return &domain->domain;
1926-
1927-
free_domain:
1928-
protection_domain_free(domain);
1929-
1930-
return NULL;
19311922
}
19321923

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

1947-
if (dom->type == IOMMU_DOMAIN_DMA)
1948-
iommu_put_dma_cookie(&domain->domain);
1949-
19501938
if (domain->flags & PD_IOMMUV2_MASK)
19511939
free_gcr3_table(domain);
19521940

0 commit comments

Comments
 (0)