diff options
Diffstat (limited to 'drivers/base/iommu.c')
-rw-r--r-- | drivers/base/iommu.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/base/iommu.c b/drivers/base/iommu.c index cf7cbec116ed..55d37e4609eb 100644 --- a/drivers/base/iommu.c +++ b/drivers/base/iommu.c | |||
@@ -119,6 +119,9 @@ int iommu_map(struct iommu_domain *domain, unsigned long iova, | |||
119 | 119 | ||
120 | BUG_ON((iova | paddr) & invalid_mask); | 120 | BUG_ON((iova | paddr) & invalid_mask); |
121 | 121 | ||
122 | if (iommu_ops->map) | ||
123 | return iommu_ops->map(domain, iova, paddr, gfp_order, prot); | ||
124 | |||
122 | return iommu_ops->map_range(domain, iova, paddr, size, prot); | 125 | return iommu_ops->map_range(domain, iova, paddr, size, prot); |
123 | } | 126 | } |
124 | EXPORT_SYMBOL_GPL(iommu_map); | 127 | EXPORT_SYMBOL_GPL(iommu_map); |
@@ -133,6 +136,9 @@ int iommu_unmap(struct iommu_domain *domain, unsigned long iova, int gfp_order) | |||
133 | 136 | ||
134 | BUG_ON(iova & invalid_mask); | 137 | BUG_ON(iova & invalid_mask); |
135 | 138 | ||
139 | if (iommu_ops->unmap) | ||
140 | return iommu_ops->unmap(domain, iova, gfp_order); | ||
141 | |||
136 | iommu_ops->unmap_range(domain, iova, size); | 142 | iommu_ops->unmap_range(domain, iova, size); |
137 | 143 | ||
138 | return gfp_order; | 144 | return gfp_order; |