BUG_ON((iova | paddr) & invalid_mask);
+ if (iommu_ops->map)
+ return iommu_ops->map(domain, iova, paddr, gfp_order, prot);
+
return iommu_ops->map_range(domain, iova, paddr, size, prot);
}
EXPORT_SYMBOL_GPL(iommu_map);
BUG_ON(iova & invalid_mask);
+ if (iommu_ops->unmap)
+ return iommu_ops->unmap(domain, iova, gfp_order);
+
iommu_ops->unmap_range(domain, iova, size);
return gfp_order;
void (*domain_destroy)(struct iommu_domain *domain);
int (*attach_dev)(struct iommu_domain *domain, struct device *dev);
void (*detach_dev)(struct iommu_domain *domain, struct device *dev);
+ int (*map)(struct iommu_domain *domain, unsigned long iova,
+ phys_addr_t paddr, int gfp_order, int prot);
+ int (*unmap)(struct iommu_domain *domain, unsigned long iova,
+ int gfp_order);
int (*map_range)(struct iommu_domain *domain, unsigned long iova,
phys_addr_t paddr, size_t size, int prot);
void (*unmap_range)(struct iommu_domain *domain, unsigned long iova,