Skip to content

Commit ca84ed7

Browse files
rmurphy-armjoergroedel
authored andcommitted
iommu/virtio: Drop IOVA cookie management
The core code bakes its own cookies now. Reviewed-by: Jean-Philippe Brucker <[email protected]> Signed-off-by: Robin Murphy <[email protected]> Link: https://lore.kernel.org/r/f05cd2d0a0f414de3180e2536c7656faf1e52418.1628682049.git.robin.murphy@arm.com Signed-off-by: Joerg Roedel <[email protected]>
1 parent aa65464 commit ca84ed7

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

drivers/iommu/virtio-iommu.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -598,12 +598,6 @@ static struct iommu_domain *viommu_domain_alloc(unsigned type)
598598
spin_lock_init(&vdomain->mappings_lock);
599599
vdomain->mappings = RB_ROOT_CACHED;
600600

601-
if (type == IOMMU_DOMAIN_DMA &&
602-
iommu_get_dma_cookie(&vdomain->domain)) {
603-
kfree(vdomain);
604-
return NULL;
605-
}
606-
607601
return &vdomain->domain;
608602
}
609603

@@ -643,8 +637,6 @@ static void viommu_domain_free(struct iommu_domain *domain)
643637
{
644638
struct viommu_domain *vdomain = to_viommu_domain(domain);
645639

646-
iommu_put_dma_cookie(domain);
647-
648640
/* Free all remaining mappings (size 2^64) */
649641
viommu_del_mappings(vdomain, 0, 0);
650642

0 commit comments

Comments
 (0)