summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitchel Humpherys <mitchelh@codeaurora.org>2014-11-12 15:11:33 -0800
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-22 11:11:23 -0700
commitb6491279cf85fd32642b93e8a8627f3e3daa77ae (patch)
tree14c1f36031a6222c9d828b59e176fe11a3ac8140
parentcc4f1763f08b782b170c23a1cf5bd40b2ef952be (diff)
iommu/arm-smmu: implement DOMAIN_ATTR_PT_BASE_ADDR
Some clients need to get the base address of the page table for a given IOMMU domain. This functionality is provided by the DOMAIN_ATTR_PT_BASE_ADDR domain attribute. Implement it in the ARM SMMU driver. Change-Id: Ibe4b11a6eaf2ca42aec326c764777373cff769cc Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
-rw-r--r--drivers/iommu/arm-smmu.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c
index 4ee43038b545..a6f76bd0850f 100644
--- a/drivers/iommu/arm-smmu.c
+++ b/drivers/iommu/arm-smmu.c
@@ -1994,6 +1994,9 @@ static int arm_smmu_domain_get_attr(struct iommu_domain *domain,
*((int *)data) = !!(smmu_domain->attributes &
(1 << DOMAIN_ATTR_COHERENT_HTW_DISABLE));
return 0;
+ case DOMAIN_ATTR_PT_BASE_ADDR:
+ *((phys_addr_t *)data) = virt_to_phys(smmu_domain->cfg.pgd);
+ return 0;
default:
return -ENODEV;
}