Skip to content

Commit

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

Reviewed-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Link: https://lore.kernel.org/r/f05cd2d0a0f414de3180e2536c7656faf1e52418.1628682049.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 aa65464 commit ca84ed7
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions drivers/iommu/virtio-iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -598,12 +598,6 @@ static struct iommu_domain *viommu_domain_alloc(unsigned type)
spin_lock_init(&vdomain->mappings_lock);
vdomain->mappings = RB_ROOT_CACHED;

if (type == IOMMU_DOMAIN_DMA &&
iommu_get_dma_cookie(&vdomain->domain)) {
kfree(vdomain);
return NULL;
}

return &vdomain->domain;
}

Expand Down Expand Up @@ -643,8 +637,6 @@ static void viommu_domain_free(struct iommu_domain *domain)
{
struct viommu_domain *vdomain = to_viommu_domain(domain);

iommu_put_dma_cookie(domain);

/* Free all remaining mappings (size 2^64) */
viommu_del_mappings(vdomain, 0, 0);

Expand Down

0 comments on commit ca84ed7

Please sign in to comment.