diff options
Diffstat (limited to 'include/linux/iommu.h')
| -rw-r--r-- | include/linux/iommu.h | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/include/linux/iommu.h b/include/linux/iommu.h index 3af4ffd591b9..0a2ba4098996 100644 --- a/include/linux/iommu.h +++ b/include/linux/iommu.h | |||
| @@ -30,6 +30,7 @@ struct iommu_domain { | |||
| 30 | }; | 30 | }; |
| 31 | 31 | ||
| 32 | #define IOMMU_CAP_CACHE_COHERENCY 0x1 | 32 | #define IOMMU_CAP_CACHE_COHERENCY 0x1 |
| 33 | #define IOMMU_CAP_INTR_REMAP 0x2 /* isolates device intrs */ | ||
| 33 | 34 | ||
| 34 | struct iommu_ops { | 35 | struct iommu_ops { |
| 35 | int (*domain_init)(struct iommu_domain *domain); | 36 | int (*domain_init)(struct iommu_domain *domain); |
| @@ -37,9 +38,9 @@ struct iommu_ops { | |||
| 37 | int (*attach_dev)(struct iommu_domain *domain, struct device *dev); | 38 | int (*attach_dev)(struct iommu_domain *domain, struct device *dev); |
| 38 | void (*detach_dev)(struct iommu_domain *domain, struct device *dev); | 39 | void (*detach_dev)(struct iommu_domain *domain, struct device *dev); |
| 39 | int (*map)(struct iommu_domain *domain, unsigned long iova, | 40 | int (*map)(struct iommu_domain *domain, unsigned long iova, |
| 40 | phys_addr_t paddr, size_t size, int prot); | 41 | phys_addr_t paddr, int gfp_order, int prot); |
| 41 | void (*unmap)(struct iommu_domain *domain, unsigned long iova, | 42 | int (*unmap)(struct iommu_domain *domain, unsigned long iova, |
| 42 | size_t size); | 43 | int gfp_order); |
| 43 | phys_addr_t (*iova_to_phys)(struct iommu_domain *domain, | 44 | phys_addr_t (*iova_to_phys)(struct iommu_domain *domain, |
| 44 | unsigned long iova); | 45 | unsigned long iova); |
| 45 | int (*domain_has_cap)(struct iommu_domain *domain, | 46 | int (*domain_has_cap)(struct iommu_domain *domain, |
| @@ -56,10 +57,10 @@ extern int iommu_attach_device(struct iommu_domain *domain, | |||
| 56 | struct device *dev); | 57 | struct device *dev); |
| 57 | extern void iommu_detach_device(struct iommu_domain *domain, | 58 | extern void iommu_detach_device(struct iommu_domain *domain, |
| 58 | struct device *dev); | 59 | struct device *dev); |
| 59 | extern int iommu_map_range(struct iommu_domain *domain, unsigned long iova, | 60 | extern int iommu_map(struct iommu_domain *domain, unsigned long iova, |
| 60 | phys_addr_t paddr, size_t size, int prot); | 61 | phys_addr_t paddr, int gfp_order, int prot); |
| 61 | extern void iommu_unmap_range(struct iommu_domain *domain, unsigned long iova, | 62 | extern int iommu_unmap(struct iommu_domain *domain, unsigned long iova, |
| 62 | size_t size); | 63 | int gfp_order); |
| 63 | extern phys_addr_t iommu_iova_to_phys(struct iommu_domain *domain, | 64 | extern phys_addr_t iommu_iova_to_phys(struct iommu_domain *domain, |
| 64 | unsigned long iova); | 65 | unsigned long iova); |
| 65 | extern int iommu_domain_has_cap(struct iommu_domain *domain, | 66 | extern int iommu_domain_has_cap(struct iommu_domain *domain, |
| @@ -96,16 +97,16 @@ static inline void iommu_detach_device(struct iommu_domain *domain, | |||
| 96 | { | 97 | { |
| 97 | } | 98 | } |
| 98 | 99 | ||
| 99 | static inline int iommu_map_range(struct iommu_domain *domain, | 100 | static inline int iommu_map(struct iommu_domain *domain, unsigned long iova, |
| 100 | unsigned long iova, phys_addr_t paddr, | 101 | phys_addr_t paddr, int gfp_order, int prot) |
| 101 | size_t size, int prot) | ||
| 102 | { | 102 | { |
| 103 | return -ENODEV; | 103 | return -ENODEV; |
| 104 | } | 104 | } |
| 105 | 105 | ||
| 106 | static inline void iommu_unmap_range(struct iommu_domain *domain, | 106 | static inline int iommu_unmap(struct iommu_domain *domain, unsigned long iova, |
| 107 | unsigned long iova, size_t size) | 107 | int gfp_order) |
| 108 | { | 108 | { |
| 109 | return -ENODEV; | ||
| 109 | } | 110 | } |
| 110 | 111 | ||
| 111 | static inline phys_addr_t iommu_iova_to_phys(struct iommu_domain *domain, | 112 | static inline phys_addr_t iommu_iova_to_phys(struct iommu_domain *domain, |
