diff options
author | Robin Murphy <robin.murphy@arm.com> | 2017-03-16 17:00:19 (GMT) |
---|---|---|
committer | Xie Xiaobo <xiaobo.xie@nxp.com> | 2017-09-25 07:25:45 (GMT) |
commit | 2d918c9fbb0c8eabc8efc63b3e98a0f8e403deb8 (patch) | |
tree | 64cbadb71d42fb48e29f81d683c2a91aeb19f473 /include | |
parent | c30a4670b500ae6c0a6b7dd8889e1e19d8c23191 (diff) | |
download | linux-2d918c9fbb0c8eabc8efc63b3e98a0f8e403deb8.tar.xz |
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>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/dma-iommu.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/dma-iommu.h b/include/linux/dma-iommu.h index d699324..36d3206 100644 --- a/include/linux/dma-iommu.h +++ b/include/linux/dma-iommu.h @@ -67,6 +67,7 @@ int iommu_dma_mapping_error(struct device *dev, dma_addr_t dma_addr); /* The DMA API isn't _quite_ the whole story, though... */ void iommu_dma_map_msi_msg(int irq, struct msi_msg *msg); +void iommu_dma_get_resv_regions(struct device *dev, struct list_head *list); #else @@ -96,6 +97,10 @@ static inline void iommu_dma_map_msi_msg(int irq, struct msi_msg *msg) { } +static inline void iommu_dma_get_resv_regions(struct device *dev, struct list_head *list) +{ +} + #endif /* CONFIG_IOMMU_DMA */ #endif /* __KERNEL__ */ #endif /* __DMA_IOMMU_H */ |