diff options
author | Joerg Roedel <joro@8bytes.org> | 2013-01-29 12:49:04 (GMT) |
---|---|---|
committer | Emil Medve <Emilian.Medve@Freescale.com> | 2013-03-21 18:42:01 (GMT) |
commit | d7b107f727c6b87bd09b17f2d1b9cb0f6efbb8c6 (patch) | |
tree | 6a5d5eaabb2881171562b34d77a0f35979d921df /drivers/iommu | |
parent | 5a5f81eccb84e864928a999863074141d5fc8424 (diff) | |
download | linux-fsl-qoriq-d7b107f727c6b87bd09b17f2d1b9cb0f6efbb8c6.tar.xz |
iommu: Implement DOMAIN_ATTR_PAGING attribute
This attribute of a domain can be queried to find out if the
domain supports setting up page-tables using the iommu_map()
and iommu_unmap() functions.
Signed-off-by: Joerg Roedel <joro@8bytes.org>
Diffstat (limited to 'drivers/iommu')
-rw-r--r-- | drivers/iommu/iommu.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c index 4e6d6f8..0e0e5f2 100644 --- a/drivers/iommu/iommu.c +++ b/drivers/iommu/iommu.c @@ -869,6 +869,7 @@ int iommu_domain_get_attr(struct iommu_domain *domain, enum iommu_attr attr, void *data) { struct iommu_domain_geometry *geometry; + bool *paging; int ret = 0; switch (attr) { @@ -877,6 +878,10 @@ int iommu_domain_get_attr(struct iommu_domain *domain, *geometry = domain->geometry; break; + case DOMAIN_ATTR_PAGING: + paging = data; + *paging = (domain->ops->pgsize_bitmap != 0UL); + break; default: if (!domain->ops->domain_get_attr) return -EINVAL; |