]> git.baikalelectronics.ru Git - kernel.git/commit
iommu/tegra-smmu: Fix page tables in > 4 GiB memory
authorThierry Reding <treding@nvidia.com>
Wed, 16 Oct 2019 11:50:26 +0000 (13:50 +0200)
committerJoerg Roedel <jroedel@suse.de>
Fri, 18 Oct 2019 09:46:11 +0000 (11:46 +0200)
commitd50727fced3c79215f3bb4a0e559d2bb53fa6951
tree865c8369b01a79df48785d07c22a164c91ff2092
parented6054c2ca2bc345ce8e8dc882a5479bc7ce13be
iommu/tegra-smmu: Fix page tables in > 4 GiB memory

Page tables that reside in physical memory beyond the 4 GiB boundary are
currently not working properly. The reason is that when the physical
address for page directory entries is read, it gets truncated at 32 bits
and can cause crashes when passing that address to the DMA API.

Fix this by first casting the PDE value to a dma_addr_t and then using
the page frame number mask for the SMMU instance to mask out the invalid
bits, which are typically used for mapping attributes, etc.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/tegra-smmu.c