summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/iommu.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/iommu.h b/include/linux/iommu.h
index 1890dd08b52e..2d835b7c226d 100644
--- a/include/linux/iommu.h
+++ b/include/linux/iommu.h
@@ -141,6 +141,8 @@ struct iommu_ops {
int (*domain_set_windows)(struct iommu_domain *domain, u32 w_count);
/* Get the numer of window per domain */
u32 (*domain_get_windows)(struct iommu_domain *domain);
+ int (*dma_supported)(struct iommu_domain *domain, struct device *dev,
+ u64 mask);
unsigned long pgsize_bitmap;
};
@@ -263,6 +265,9 @@ static inline size_t iommu_map_sg(struct iommu_domain *domain,
return domain->ops->map_sg(domain, iova, sg, nents, prot);
}
+extern int iommu_dma_supported(struct iommu_domain *domain, struct device *dev,
+ u64 mask);
+
#else /* CONFIG_IOMMU_API */
struct iommu_ops {};
@@ -453,6 +458,12 @@ static inline void iommu_device_unlink(struct device *dev, struct device *link)
{
}
+static int iommu_dma_supported(struct iommu_domain *domain, struct device *dev,
+ u64 mask)
+{
+ return -EINVAL;
+}
+
#endif /* CONFIG_IOMMU_API */
#endif /* __LINUX_IOMMU_H */