• Robin Murphy's avatar
    iommu/ipmmu-vmsa: Unify domain alloc/free · 1c7e7c02
    Robin Murphy authored
    We have two implementations for ipmmu_ops->alloc depending on
    CONFIG_IOMMU_DMA, the difference being whether they accept the
    IOMMU_DOMAIN_DMA type or not. However, iommu_dma_get_cookie() is
    guaranteed to return an error when !CONFIG_IOMMU_DMA, so if
    ipmmu_domain_alloc_dma() was actually checking and handling the return
    value correctly, it would behave the same as ipmmu_domain_alloc()
    anyway.
    
    Similarly for freeing; iommu_put_dma_cookie() is robust by design.
    Signed-off-by: default avatarRobin Murphy <robin.murphy@arm.com>
    Signed-off-by: default avatarAlex Williamson <alex.williamson@redhat.com>
    1c7e7c02
ipmmu-vmsa.c 25.4 KB