lkml.org 
[lkml]   [2021]   [Jul]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 02/23] iommu/amd: Drop IOVA cookie management
    Date
    The core code bakes its own cookies now.

    Signed-off-by: Robin Murphy <robin.murphy@arm.com>
    ---
    drivers/iommu/amd/iommu.c | 12 ------------
    1 file changed, 12 deletions(-)

    diff --git a/drivers/iommu/amd/iommu.c b/drivers/iommu/amd/iommu.c
    index 811a49a95d04..40ae7130fc80 100644
    --- a/drivers/iommu/amd/iommu.c
    +++ b/drivers/iommu/amd/iommu.c
    @@ -1924,16 +1924,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)
    @@ -1950,9 +1941,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);

    --
    2.25.1
    \
     
     \ /
      Last update: 2021-07-21 20:21    [W:4.200 / U:0.192 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site