iommu/dma: Make PCI window reservation generic
authorRobin Murphy <robin.murphy@arm.com>
Thu, 16 Mar 2017 17:00:19 +0000 (17:00 +0000)
committerJoerg Roedel <jroedel@suse.de>
Wed, 22 Mar 2017 15:18:59 +0000 (16:18 +0100)
commit273df9635385b2156851c7ee49f40658d7bcb29d
tree4185120550ff7cd9d08fd96cc5a06a3530690086
parent7c1b058c8b5a310f2f0439aff14e454aa9afe502
iommu/dma: Make PCI window reservation generic

Now that we're applying the IOMMU API reserved regions to our IOVA
domains, we shouldn't need to privately special-case PCI windows, or
indeed anything else which isn't specific to our iommu-dma layer.
However, since those aren't IOMMU-specific either, rather than start
duplicating code into IOMMU drivers let's transform the existing
function into an iommu_get_resv_regions() helper that they can share.

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/arm-smmu-v3.c
drivers/iommu/arm-smmu.c
drivers/iommu/dma-iommu.c
include/linux/dma-iommu.h