diff options
author | Robin Murphy <robin.murphy@arm.com> | 2017-03-16 17:00:19 +0000 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2017-03-22 16:18:59 +0100 |
commit | 273df9635385b2156851c7ee49f40658d7bcb29d (patch) | |
tree | 4185120550ff7cd9d08fd96cc5a06a3530690086 /include/linux/dma-iommu.h | |
parent | 7c1b058c8b5a310f2f0439aff14e454aa9afe502 (diff) | |
download | lwn-273df9635385b2156851c7ee49f40658d7bcb29d.tar.gz lwn-273df9635385b2156851c7ee49f40658d7bcb29d.zip |
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/linux/dma-iommu.h')
-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 5725c94b1f12..b6635a46fc7c 100644 --- a/include/linux/dma-iommu.h +++ b/include/linux/dma-iommu.h @@ -71,6 +71,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 @@ -100,6 +101,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 */ |