Linux Tegra architecture development
 help / color / mirror / Atom feed
* [PATCH V2] iommu: arm-smmu: Fix Tegra workaround for PAGE_SIZE mappings
@ 2024-07-24 17:31 Ashish Mhetre
  2024-07-25 12:42 ` Will Deacon
  0 siblings, 1 reply; 2+ messages in thread
From: Ashish Mhetre @ 2024-07-24 17:31 UTC (permalink / raw)
  To: thierry.reding, vdumpa, will, robin.murphy, joro
  Cc: linux-tegra, linux-arm-kernel, iommu, linux-kernel, Ashish Mhetre

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>
---
 drivers/iommu/arm/arm-smmu/arm-smmu-nvidia.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu-nvidia.c b/drivers/iommu/arm/arm-smmu/arm-smmu-nvidia.c
index 4b2994b6126d..2fce4f6d4e1b 100644
--- a/drivers/iommu/arm/arm-smmu/arm-smmu-nvidia.c
+++ b/drivers/iommu/arm/arm-smmu/arm-smmu-nvidia.c
@@ -277,7 +277,7 @@ static int nvidia_smmu_init_context(struct arm_smmu_domain *smmu_domain,
 	 */
 	if (of_device_is_compatible(np, "nvidia,tegra234-smmu") ||
 	    of_device_is_compatible(np, "nvidia,tegra194-smmu")) {
-		smmu->pgsize_bitmap = PAGE_SIZE;
+		smmu->pgsize_bitmap &= GENMASK(PAGE_SHIFT, 0);
 		pgtbl_cfg->pgsize_bitmap = smmu->pgsize_bitmap;
 	}
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH V2] iommu: arm-smmu: Fix Tegra workaround for PAGE_SIZE mappings
  2024-07-24 17:31 [PATCH V2] iommu: arm-smmu: Fix Tegra workaround for PAGE_SIZE mappings Ashish Mhetre
@ 2024-07-25 12:42 ` Will Deacon
  0 siblings, 0 replies; 2+ messages in thread
From: Will Deacon @ 2024-07-25 12:42 UTC (permalink / raw)
  To: thierry.reding, vdumpa, robin.murphy, joro, Ashish Mhetre
  Cc: catalin.marinas, kernel-team, Will Deacon, linux-tegra,
	linux-arm-kernel, iommu, linux-kernel

On Wed, 24 Jul 2024 17:31:32 +0000, Ashish Mhetre wrote:
> 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.
> 
> 

Applied to iommu (next), thanks!

[1/1] iommu: arm-smmu: Fix Tegra workaround for PAGE_SIZE mappings
      https://git.kernel.org/iommu/c/726d4f528dbc

Cheers,
-- 
Will

https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-07-25 12:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-24 17:31 [PATCH V2] iommu: arm-smmu: Fix Tegra workaround for PAGE_SIZE mappings Ashish Mhetre
2024-07-25 12:42 ` Will Deacon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox