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>
This commit is contained in:
parent
7bd641abae
commit
c3c7ce2a6d
1 changed files with 4 additions and 0 deletions
|
@ -1684,6 +1684,10 @@ static int arm_smmu_domain_get_attr(struct iommu_domain *domain,
|
||||||
*((int *)data) = !!(smmu_domain->attributes &
|
*((int *)data) = !!(smmu_domain->attributes &
|
||||||
(1 << DOMAIN_ATTR_COHERENT_HTW_DISABLE));
|
(1 << DOMAIN_ATTR_COHERENT_HTW_DISABLE));
|
||||||
return 0;
|
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:
|
default:
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue