aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/dma-iommu.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/dma-iommu.h')
-rw-r--r--include/linux/dma-iommu.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/include/linux/dma-iommu.h b/include/linux/dma-iommu.h
index 81c5c8d167ad..32c589062bd9 100644
--- a/include/linux/dma-iommu.h
+++ b/include/linux/dma-iommu.h
@@ -21,6 +21,7 @@
21 21
22#ifdef CONFIG_IOMMU_DMA 22#ifdef CONFIG_IOMMU_DMA
23#include <linux/iommu.h> 23#include <linux/iommu.h>
24#include <linux/msi.h>
24 25
25int iommu_dma_init(void); 26int iommu_dma_init(void);
26 27
@@ -29,7 +30,8 @@ int iommu_get_dma_cookie(struct iommu_domain *domain);
29void iommu_put_dma_cookie(struct iommu_domain *domain); 30void iommu_put_dma_cookie(struct iommu_domain *domain);
30 31
31/* Setup call for arch DMA mapping code */ 32/* Setup call for arch DMA mapping code */
32int iommu_dma_init_domain(struct iommu_domain *domain, dma_addr_t base, u64 size); 33int iommu_dma_init_domain(struct iommu_domain *domain, dma_addr_t base,
34 u64 size, struct device *dev);
33 35
34/* General helpers for DMA-API <-> IOMMU-API interaction */ 36/* General helpers for DMA-API <-> IOMMU-API interaction */
35int dma_direction_to_prot(enum dma_data_direction dir, bool coherent); 37int dma_direction_to_prot(enum dma_data_direction dir, bool coherent);
@@ -62,9 +64,13 @@ void iommu_dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nents,
62int iommu_dma_supported(struct device *dev, u64 mask); 64int iommu_dma_supported(struct device *dev, u64 mask);
63int iommu_dma_mapping_error(struct device *dev, dma_addr_t dma_addr); 65int iommu_dma_mapping_error(struct device *dev, dma_addr_t dma_addr);
64 66
67/* The DMA API isn't _quite_ the whole story, though... */
68void iommu_dma_map_msi_msg(int irq, struct msi_msg *msg);
69
65#else 70#else
66 71
67struct iommu_domain; 72struct iommu_domain;
73struct msi_msg;
68 74
69static inline int iommu_dma_init(void) 75static inline int iommu_dma_init(void)
70{ 76{
@@ -80,6 +86,10 @@ static inline void iommu_put_dma_cookie(struct iommu_domain *domain)
80{ 86{
81} 87}
82 88
89static inline void iommu_dma_map_msi_msg(int irq, struct msi_msg *msg)
90{
91}
92
83#endif /* CONFIG_IOMMU_DMA */ 93#endif /* CONFIG_IOMMU_DMA */
84#endif /* __KERNEL__ */ 94#endif /* __KERNEL__ */
85#endif /* __DMA_IOMMU_H */ 95#endif /* __DMA_IOMMU_H */