diff options
Diffstat (limited to 'drivers/base/iommu.c')
-rw-r--r-- | drivers/base/iommu.c | 26 |
1 files changed, 2 insertions, 24 deletions
diff --git a/drivers/base/iommu.c b/drivers/base/iommu.c index 55d37e4609eb..6e6b6a11b3ce 100644 --- a/drivers/base/iommu.c +++ b/drivers/base/iommu.c | |||
@@ -80,20 +80,6 @@ void iommu_detach_device(struct iommu_domain *domain, struct device *dev) | |||
80 | } | 80 | } |
81 | EXPORT_SYMBOL_GPL(iommu_detach_device); | 81 | EXPORT_SYMBOL_GPL(iommu_detach_device); |
82 | 82 | ||
83 | int iommu_map_range(struct iommu_domain *domain, unsigned long iova, | ||
84 | phys_addr_t paddr, size_t size, int prot) | ||
85 | { | ||
86 | return iommu_ops->map_range(domain, iova, paddr, size, prot); | ||
87 | } | ||
88 | EXPORT_SYMBOL_GPL(iommu_map_range); | ||
89 | |||
90 | void iommu_unmap_range(struct iommu_domain *domain, unsigned long iova, | ||
91 | size_t size) | ||
92 | { | ||
93 | iommu_ops->unmap_range(domain, iova, size); | ||
94 | } | ||
95 | EXPORT_SYMBOL_GPL(iommu_unmap_range); | ||
96 | |||
97 | phys_addr_t iommu_iova_to_phys(struct iommu_domain *domain, | 83 | phys_addr_t iommu_iova_to_phys(struct iommu_domain *domain, |
98 | unsigned long iova) | 84 | unsigned long iova) |
99 | { | 85 | { |
@@ -119,10 +105,7 @@ int iommu_map(struct iommu_domain *domain, unsigned long iova, | |||
119 | 105 | ||
120 | BUG_ON((iova | paddr) & invalid_mask); | 106 | BUG_ON((iova | paddr) & invalid_mask); |
121 | 107 | ||
122 | if (iommu_ops->map) | 108 | return iommu_ops->map(domain, iova, paddr, gfp_order, prot); |
123 | return iommu_ops->map(domain, iova, paddr, gfp_order, prot); | ||
124 | |||
125 | return iommu_ops->map_range(domain, iova, paddr, size, prot); | ||
126 | } | 109 | } |
127 | EXPORT_SYMBOL_GPL(iommu_map); | 110 | EXPORT_SYMBOL_GPL(iommu_map); |
128 | 111 | ||
@@ -136,11 +119,6 @@ int iommu_unmap(struct iommu_domain *domain, unsigned long iova, int gfp_order) | |||
136 | 119 | ||
137 | BUG_ON(iova & invalid_mask); | 120 | BUG_ON(iova & invalid_mask); |
138 | 121 | ||
139 | if (iommu_ops->unmap) | 122 | return iommu_ops->unmap(domain, iova, gfp_order); |
140 | return iommu_ops->unmap(domain, iova, gfp_order); | ||
141 | |||
142 | iommu_ops->unmap_range(domain, iova, size); | ||
143 | |||
144 | return gfp_order; | ||
145 | } | 123 | } |
146 | EXPORT_SYMBOL_GPL(iommu_unmap); | 124 | EXPORT_SYMBOL_GPL(iommu_unmap); |