Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

iommu/arm-smmu: Set domain geometry

For non-aperture-based IOMMUs, the domain geometry seems to have become
the de-facto way of indicating the input address space size. That is
quite a useful thing from the users' perspective, so let's do the same.

Reviewed-by: Eric Auger <eric.auger@redhat.com>
Tested-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>

authored by

Robin Murphy and committed by
Will Deacon
455eb7d3 021bb842

+4
+2
drivers/iommu/arm-smmu-v3.c
··· 1551 1551 return -ENOMEM; 1552 1552 1553 1553 domain->pgsize_bitmap = pgtbl_cfg.pgsize_bitmap; 1554 + domain->geometry.aperture_end = (1UL << ias) - 1; 1555 + domain->geometry.force_aperture = true; 1554 1556 smmu_domain->pgtbl_ops = pgtbl_ops; 1555 1557 1556 1558 ret = finalise_stage_fn(smmu_domain, &pgtbl_cfg);
+2
drivers/iommu/arm-smmu.c
··· 939 939 940 940 /* Update the domain's page sizes to reflect the page table format */ 941 941 domain->pgsize_bitmap = pgtbl_cfg.pgsize_bitmap; 942 + domain->geometry.aperture_end = (1UL << ias) - 1; 943 + domain->geometry.force_aperture = true; 942 944 943 945 /* Initialise the context bank with our page table cfg */ 944 946 arm_smmu_init_context_bank(smmu_domain, &pgtbl_cfg);