[PATCH v6 2/3] iommu/arm-smmu: Enable contiguous hints for LPAE page tables
From: Vijayanand Jitta
Date: Tue Dec 01 2026 - 04:38:24 EST
Enable the ARM LPAE contiguous hint for page tables used by ARM SMMU
v2. The LPAE allocator derives the effective CONT mapping sizes and
publishes them in the domain page-size bitmap.
Restrict the opt-in to v2 LPAE page tables, leaving SMMUv1 and ARMv7s
formats unchanged.
Signed-off-by: Vijayanand Jitta <vijayanand.jitta@xxxxxxxxxxxxxxxx>
---
drivers/iommu/arm/arm-smmu/arm-smmu.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu.c b/drivers/iommu/arm/arm-smmu/arm-smmu.c
index 889a0966d36cd..070804139f8e7 100644
--- a/drivers/iommu/arm/arm-smmu/arm-smmu.c
+++ b/drivers/iommu/arm/arm-smmu/arm-smmu.c
@@ -822,6 +822,9 @@ static int arm_smmu_init_domain_context(struct arm_smmu_domain *smmu_domain,
if (smmu_domain->pgtbl_quirks)
pgtbl_cfg.quirks |= smmu_domain->pgtbl_quirks;
+ if (smmu->version == ARM_SMMU_V2 && fmt != ARM_V7S)
+ pgtbl_cfg.quirks |= IO_PGTABLE_QUIRK_ARM_CONT_HINT;
+
pgtbl_ops = alloc_io_pgtable_ops(fmt, &pgtbl_cfg, smmu_domain);
if (!pgtbl_ops) {
ret = -ENOMEM;
--
2.34.1