Skip to content

Commit 726d4f5

Browse files
ashishmhetre8willdeacon
authored andcommitted
iommu: arm-smmu: Fix Tegra workaround for PAGE_SIZE mappings
PAGE_SIZE can be 16KB for Tegra which is not supported by MMU-500 on both Tegra194 and Tegra234. Retain only valid granularities from pgsize_bitmap which would either be 4KB or 64KB. Signed-off-by: Ashish Mhetre <amhetre@nvidia.com> Link: https://lore.kernel.org/r/20240724173132.219978-1-amhetre@nvidia.com Signed-off-by: Will Deacon <will@kernel.org>
1 parent 86c5eac commit 726d4f5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/iommu/arm/arm-smmu/arm-smmu-nvidia.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ static int nvidia_smmu_init_context(struct arm_smmu_domain *smmu_domain,
277277
*/
278278
if (of_device_is_compatible(np, "nvidia,tegra234-smmu") ||
279279
of_device_is_compatible(np, "nvidia,tegra194-smmu")) {
280-
smmu->pgsize_bitmap = PAGE_SIZE;
280+
smmu->pgsize_bitmap &= GENMASK(PAGE_SHIFT, 0);
281281
pgtbl_cfg->pgsize_bitmap = smmu->pgsize_bitmap;
282282
}
283283

0 commit comments

Comments
 (0)