Skip to content

Commit

Permalink
iommu/amd: Drop IOVA cookie management
Browse files Browse the repository at this point in the history
The core code bakes its own cookies now.

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Link: https://lore.kernel.org/r/648e74e7422caa6a7db7fb0c36813c7bd2007af8.1628682048.git.robin.murphy@arm.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
  • Loading branch information
Robin Murphy authored and Joerg Roedel committed Aug 18, 2021
1 parent 46983fc commit 3f166da
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions drivers/iommu/amd/iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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);

Expand Down

0 comments on commit 3f166da

Please sign in to comment.