• C
    iommu/dma: Refactor iommu_dma_alloc, part 2 · ee1ef05d
    Christoph Hellwig 提交于
    All the logic in iommu_dma_alloc that deals with page allocation from
    the CMA or page allocators can be split into a self-contained helper,
    and we can than map the result of that or the atomic pool allocation
    with the iommu later.  This also allows reusing __iommu_dma_free to
    tear down the allocations and MMU mappings when the IOMMU mapping
    fails.
    
    Based on a patch from Robin Murphy.
    Signed-off-by: NChristoph Hellwig <hch@lst.de>
    Signed-off-by: NJoerg Roedel <jroedel@suse.de>
    ee1ef05d
dma-iommu.c 35.3 KB