diff options
Diffstat (limited to 'drivers/iommu/iommu.c')
-rw-r--r-- | drivers/iommu/iommu.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c index 2fb2963df553..7a2953d8f12e 100644 --- a/drivers/iommu/iommu.c +++ b/drivers/iommu/iommu.c | |||
@@ -168,13 +168,13 @@ int iommu_map(struct iommu_domain *domain, unsigned long iova, | |||
168 | 168 | ||
169 | BUG_ON(!IS_ALIGNED(iova | paddr, size)); | 169 | BUG_ON(!IS_ALIGNED(iova | paddr, size)); |
170 | 170 | ||
171 | return domain->ops->map(domain, iova, paddr, gfp_order, prot); | 171 | return domain->ops->map(domain, iova, paddr, size, prot); |
172 | } | 172 | } |
173 | EXPORT_SYMBOL_GPL(iommu_map); | 173 | EXPORT_SYMBOL_GPL(iommu_map); |
174 | 174 | ||
175 | int iommu_unmap(struct iommu_domain *domain, unsigned long iova, int gfp_order) | 175 | int iommu_unmap(struct iommu_domain *domain, unsigned long iova, int gfp_order) |
176 | { | 176 | { |
177 | size_t size; | 177 | size_t size, unmapped; |
178 | 178 | ||
179 | if (unlikely(domain->ops->unmap == NULL)) | 179 | if (unlikely(domain->ops->unmap == NULL)) |
180 | return -ENODEV; | 180 | return -ENODEV; |
@@ -183,6 +183,8 @@ int iommu_unmap(struct iommu_domain *domain, unsigned long iova, int gfp_order) | |||
183 | 183 | ||
184 | BUG_ON(!IS_ALIGNED(iova, size)); | 184 | BUG_ON(!IS_ALIGNED(iova, size)); |
185 | 185 | ||
186 | return domain->ops->unmap(domain, iova, gfp_order); | 186 | unmapped = domain->ops->unmap(domain, iova, size); |
187 | |||
188 | return get_order(unmapped); | ||
187 | } | 189 | } |
188 | EXPORT_SYMBOL_GPL(iommu_unmap); | 190 | EXPORT_SYMBOL_GPL(iommu_unmap); |