iommu: Implement DOMAIN_ATTR_PAGING attribute
[platform/adaptation/renesas_rcar/renesas_kernel.git] / drivers / iommu / iommu.c
index 4e6d6f8..0e0e5f2 100644 (file)
@@ -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;