diff options
-rw-r--r-- | drivers/iommu/iommu.c | 2 | ||||
-rw-r--r-- | include/linux/iommu.h | 11 |
2 files changed, 8 insertions, 5 deletions
diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c index 0639b9274b11..bc45478e26db 100644 --- a/drivers/iommu/iommu.c +++ b/drivers/iommu/iommu.c | |||
@@ -948,7 +948,7 @@ phys_addr_t iommu_iova_to_phys(struct iommu_domain *domain, dma_addr_t iova) | |||
948 | EXPORT_SYMBOL_GPL(iommu_iova_to_phys); | 948 | EXPORT_SYMBOL_GPL(iommu_iova_to_phys); |
949 | 949 | ||
950 | int iommu_domain_has_cap(struct iommu_domain *domain, | 950 | int iommu_domain_has_cap(struct iommu_domain *domain, |
951 | unsigned long cap) | 951 | enum iommu_cap cap) |
952 | { | 952 | { |
953 | if (unlikely(domain->ops->domain_has_cap == NULL)) | 953 | if (unlikely(domain->ops->domain_has_cap == NULL)) |
954 | return 0; | 954 | return 0; |
diff --git a/include/linux/iommu.h b/include/linux/iommu.h index 20f9a527922a..98fc126655ae 100644 --- a/include/linux/iommu.h +++ b/include/linux/iommu.h | |||
@@ -57,8 +57,11 @@ struct iommu_domain { | |||
57 | struct iommu_domain_geometry geometry; | 57 | struct iommu_domain_geometry geometry; |
58 | }; | 58 | }; |
59 | 59 | ||
60 | #define IOMMU_CAP_CACHE_COHERENCY 0x1 | 60 | enum iommu_cap { |
61 | #define IOMMU_CAP_INTR_REMAP 0x2 /* isolates device intrs */ | 61 | IOMMU_CAP_CACHE_COHERENCY, /* IOMMU can enforce cache coherent DMA |
62 | transactions */ | ||
63 | IOMMU_CAP_INTR_REMAP, /* IOMMU supports interrupt isolation */ | ||
64 | }; | ||
62 | 65 | ||
63 | /* | 66 | /* |
64 | * Following constraints are specifc to FSL_PAMUV1: | 67 | * Following constraints are specifc to FSL_PAMUV1: |
@@ -155,7 +158,7 @@ extern size_t iommu_unmap(struct iommu_domain *domain, unsigned long iova, | |||
155 | size_t size); | 158 | size_t size); |
156 | extern phys_addr_t iommu_iova_to_phys(struct iommu_domain *domain, dma_addr_t iova); | 159 | extern phys_addr_t iommu_iova_to_phys(struct iommu_domain *domain, dma_addr_t iova); |
157 | extern int iommu_domain_has_cap(struct iommu_domain *domain, | 160 | extern int iommu_domain_has_cap(struct iommu_domain *domain, |
158 | unsigned long cap); | 161 | enum iommu_cap cap); |
159 | extern void iommu_set_fault_handler(struct iommu_domain *domain, | 162 | extern void iommu_set_fault_handler(struct iommu_domain *domain, |
160 | iommu_fault_handler_t handler, void *token); | 163 | iommu_fault_handler_t handler, void *token); |
161 | 164 | ||
@@ -305,7 +308,7 @@ static inline phys_addr_t iommu_iova_to_phys(struct iommu_domain *domain, dma_ad | |||
305 | } | 308 | } |
306 | 309 | ||
307 | static inline int iommu_domain_has_cap(struct iommu_domain *domain, | 310 | static inline int iommu_domain_has_cap(struct iommu_domain *domain, |
308 | unsigned long cap) | 311 | enum iommu_cap cap) |
309 | { | 312 | { |
310 | return 0; | 313 | return 0; |
311 | } | 314 | } |