]> git.baikalelectronics.ru Git - kernel.git/commit
iommu: arm-smmu: disable large page mappings for Nvidia arm-smmu
authorAshish Mhetre <amhetre@nvidia.com>
Thu, 21 Apr 2022 08:15:04 +0000 (13:45 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 May 2022 08:26:52 +0000 (10:26 +0200)
commit5dac0fe48ca10bec317834a5bf66e51b052b7c9a
tree1128e1985009efbf9ea7b0660fe6738e3052f8fd
parentf4a0c0199d51313c4a2de94d43e593f1a92103f8
iommu: arm-smmu: disable large page mappings for Nvidia arm-smmu

[ Upstream commit 9903ef3bcc127752961cd17282f8504d35789ef1 ]

Tegra194 and Tegra234 SoCs have the erratum that causes walk cache
entries to not be invalidated correctly. The problem is that the walk
cache index generated for IOVA is not same across translation and
invalidation requests. This is leading to page faults when PMD entry is
released during unmap and populated with new PTE table during subsequent
map request. Disabling large page mappings avoids the release of PMD
entry and avoid translations seeing stale PMD entry in walk cache.
Fix this by limiting the page mappings to PAGE_SIZE for Tegra194 and
Tegra234 devices. This is recommended fix from Tegra hardware design
team.

Acked-by: Robin Murphy <robin.murphy@arm.com>
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
Co-developed-by: Pritesh Raithatha <praithatha@nvidia.com>
Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
Signed-off-by: Ashish Mhetre <amhetre@nvidia.com>
Link: https://lore.kernel.org/r/20220421081504.24678-1-amhetre@nvidia.com
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/iommu/arm/arm-smmu/arm-smmu-nvidia.c