diff options
Diffstat (limited to 'include/linux/iommu.h')
-rw-r--r-- | include/linux/iommu.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/iommu.h b/include/linux/iommu.h index 8a7bfb1b6ca0..0cf3a4e43f23 100644 --- a/include/linux/iommu.h +++ b/include/linux/iommu.h | |||
@@ -28,6 +28,8 @@ struct iommu_domain { | |||
28 | void *priv; | 28 | void *priv; |
29 | }; | 29 | }; |
30 | 30 | ||
31 | #define IOMMU_CAP_CACHE_COHERENCY 0x1 | ||
32 | |||
31 | struct iommu_ops { | 33 | struct iommu_ops { |
32 | int (*domain_init)(struct iommu_domain *domain); | 34 | int (*domain_init)(struct iommu_domain *domain); |
33 | void (*domain_destroy)(struct iommu_domain *domain); | 35 | void (*domain_destroy)(struct iommu_domain *domain); |
@@ -39,6 +41,8 @@ struct iommu_ops { | |||
39 | size_t size); | 41 | size_t size); |
40 | phys_addr_t (*iova_to_phys)(struct iommu_domain *domain, | 42 | phys_addr_t (*iova_to_phys)(struct iommu_domain *domain, |
41 | unsigned long iova); | 43 | unsigned long iova); |
44 | int (*domain_has_cap)(struct iommu_domain *domain, | ||
45 | unsigned long cap); | ||
42 | }; | 46 | }; |
43 | 47 | ||
44 | #ifdef CONFIG_IOMMU_API | 48 | #ifdef CONFIG_IOMMU_API |
@@ -57,6 +61,8 @@ extern void iommu_unmap_range(struct iommu_domain *domain, unsigned long iova, | |||
57 | size_t size); | 61 | size_t size); |
58 | extern phys_addr_t iommu_iova_to_phys(struct iommu_domain *domain, | 62 | extern phys_addr_t iommu_iova_to_phys(struct iommu_domain *domain, |
59 | unsigned long iova); | 63 | unsigned long iova); |
64 | extern int iommu_domain_has_cap(struct iommu_domain *domain, | ||
65 | unsigned long cap); | ||
60 | 66 | ||
61 | #else /* CONFIG_IOMMU_API */ | 67 | #else /* CONFIG_IOMMU_API */ |
62 | 68 | ||
@@ -107,6 +113,12 @@ static inline phys_addr_t iommu_iova_to_phys(struct iommu_domain *domain, | |||
107 | return 0; | 113 | return 0; |
108 | } | 114 | } |
109 | 115 | ||
116 | static inline int domain_has_cap(struct iommu_domain *domain, | ||
117 | unsigned long cap) | ||
118 | { | ||
119 | return 0; | ||
120 | } | ||
121 | |||
110 | #endif /* CONFIG_IOMMU_API */ | 122 | #endif /* CONFIG_IOMMU_API */ |
111 | 123 | ||
112 | #endif /* __LINUX_IOMMU_H */ | 124 | #endif /* __LINUX_IOMMU_H */ |