]> git.baikalelectronics.ru Git - kernel.git/commit
iommu/dma: Refactor iommu_dma_free
authorRobin Murphy <robin.murphy@arm.com>
Mon, 20 May 2019 07:29:36 +0000 (09:29 +0200)
committerJoerg Roedel <jroedel@suse.de>
Mon, 27 May 2019 15:31:11 +0000 (17:31 +0200)
commit01c93eb5d04108f5875480da6281d2acd0bf22f6
tree0f3d394f74b0682dde1b2900069b985cdfa8528d
parent1944984ffa811ce430803cc80bb9e95a716f5820
iommu/dma: Refactor iommu_dma_free

The freeing logic was made particularly horrible by part of it being
opaque to the arch wrapper, which led to a lot of convoluted repetition
to ensure each path did everything in the right order. Now that it's
all private, we can pick apart and consolidate the logically-distinct
steps of freeing the IOMMU mapping, the underlying pages, and the CPU
remap (if necessary) into something much more manageable.

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
[various cosmetic changes to the code flow]
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/dma-iommu.c