summaryrefslogtreecommitdiff
path: root/drivers/iommu
diff options
context:
space:
mode:
authorLiam Mark <lmark@codeaurora.org>2016-12-09 14:36:07 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2017-01-04 14:18:24 -0800
commit90d80a06deede1b9d3e857bd26c15d2bc05850ca (patch)
tree575452829c7c07a3cf9052d8e7bde47d4a16bdc1 /drivers/iommu
parentf18f48d761000ae252cfdc59a4c9eba68d58394b (diff)
iommu: support querying IOVA coherency
Support querying whether an IOVA is mapped as coherent. Change-Id: Icd122348e309495b09bcf77628aa1746f0255305 Signed-off-by: Liam Mark <lmark@codeaurora.org>
Diffstat (limited to 'drivers/iommu')
-rw-r--r--drivers/iommu/iommu.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
index 8ab502d80270..a77a45088b9d 100644
--- a/drivers/iommu/iommu.c
+++ b/drivers/iommu/iommu.c
@@ -1336,6 +1336,13 @@ phys_addr_t iommu_iova_to_phys_hard(struct iommu_domain *domain,
return domain->ops->iova_to_phys_hard(domain, iova);
}
+bool iommu_is_iova_coherent(struct iommu_domain *domain, dma_addr_t iova)
+{
+ if (unlikely(domain->ops->is_iova_coherent == NULL))
+ return 0;
+
+ return domain->ops->is_iova_coherent(domain, iova);
+}
static unsigned long iommu_get_pgsize_bitmap(struct iommu_domain *domain)
{
if (domain->ops->get_pgsize_bitmap)