summaryrefslogtreecommitdiff
path: root/drivers/base
diff options
context:
space:
mode:
authorSheng Yang <sheng@linux.intel.com>2009-03-18 10:33:06 +0300
committerDavid Woodhouse <David.Woodhouse@intel.com>2009-03-24 12:42:51 +0300
commitdbb9fd8630e95b6155aff658a2b5f80e95ca2bc6 (patch)
treeb24caff50e1c5bfb428cb7422608bfef95d916e8 /drivers/base
parent58c610bd1a3f50820e45a7c09ec0e44d2cda15dd (diff)
downloadlinux-dbb9fd8630e95b6155aff658a2b5f80e95ca2bc6.tar.xz
iommu: Add domain_has_cap iommu_ops
This iommu_op can tell if domain have a specific capability, like snooping control for Intel IOMMU, which can be used by other components of kernel to adjust the behaviour. Signed-off-by: Sheng Yang <sheng@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/iommu.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/base/iommu.c b/drivers/base/iommu.c
index 5e039d4f877c..c314f144825f 100644
--- a/drivers/base/iommu.c
+++ b/drivers/base/iommu.c
@@ -98,3 +98,10 @@ phys_addr_t iommu_iova_to_phys(struct iommu_domain *domain,
return iommu_ops->iova_to_phys(domain, iova);
}
EXPORT_SYMBOL_GPL(iommu_iova_to_phys);
+
+int iommu_domain_has_cap(struct iommu_domain *domain,
+ unsigned long cap)
+{
+ return iommu_ops->domain_has_cap(domain, cap);
+}
+EXPORT_SYMBOL_GPL(iommu_domain_has_cap);