diff options
| author | Mitchel Humpherys <mitchelh@codeaurora.org> | 2014-11-12 15:11:33 -0800 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-22 11:12:21 -0700 |
| commit | c3c7ce2a6db6a3c62de65d6d0b940253fcda48ff (patch) | |
| tree | c97aa9a446d2a4f9c175cb281e792f1f855d37e5 | |
| parent | 7bd641abae32fb25bb77703102176cdcc34c6f0c (diff) | |
iommu/arm-smmu: implement DOMAIN_ATTR_PT_BASE_ADDR using ttbr[0]
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 by returning ttbr[0] from the page table config.
Change-Id: Ie9b0241c7c7df18b25761bae79c1be1a283ff3a4
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
| -rw-r--r-- | drivers/iommu/arm-smmu.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c index baddfa084fdd..754a18ec6b8f 100644 --- a/drivers/iommu/arm-smmu.c +++ b/drivers/iommu/arm-smmu.c @@ -1684,6 +1684,10 @@ 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) = + smmu_domain->pgtbl_cfg.arm_lpae_s1_cfg.ttbr[0]; + return 0; default: return -ENODEV; } |
