diff options
Diffstat (limited to 'include/linux/dma-iommu.h')
-rw-r--r-- | include/linux/dma-iommu.h | 12 |
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 | ||
25 | int iommu_dma_init(void); | 26 | int iommu_dma_init(void); |
26 | 27 | ||
@@ -29,7 +30,8 @@ int iommu_get_dma_cookie(struct iommu_domain *domain); | |||
29 | void iommu_put_dma_cookie(struct iommu_domain *domain); | 30 | void 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 */ |
32 | int iommu_dma_init_domain(struct iommu_domain *domain, dma_addr_t base, u64 size); | 33 | int 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 */ |
35 | int dma_direction_to_prot(enum dma_data_direction dir, bool coherent); | 37 | int 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, | |||
62 | int iommu_dma_supported(struct device *dev, u64 mask); | 64 | int iommu_dma_supported(struct device *dev, u64 mask); |
63 | int iommu_dma_mapping_error(struct device *dev, dma_addr_t dma_addr); | 65 | int 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... */ | ||
68 | void iommu_dma_map_msi_msg(int irq, struct msi_msg *msg); | ||
69 | |||
65 | #else | 70 | #else |
66 | 71 | ||
67 | struct iommu_domain; | 72 | struct iommu_domain; |
73 | struct msi_msg; | ||
68 | 74 | ||
69 | static inline int iommu_dma_init(void) | 75 | static 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 | ||
89 | static 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 */ |