]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
iommu/tegra-smmu: Fix tlb_mask
authorNicolin Chen <nicoleotsuka@gmail.com>
Thu, 17 Sep 2020 11:31:54 +0000 (04:31 -0700)
committerJoerg Roedel <jroedel@suse.de>
Fri, 18 Sep 2020 09:07:06 +0000 (11:07 +0200)
commitd5c152c3409ac1982a9277d8d344e073eda17e78
tree2d5daacfcb5e7679880e4dc05bba21260fecc3a7
parent404d0b308e4f730b1c9b2f33e84a6f7069db94c5
iommu/tegra-smmu: Fix tlb_mask

The "num_tlb_lines" might not be a power-of-2 value, being 48 on
Tegra210 for example. So the current way of calculating tlb_mask
using the num_tlb_lines is not correct: tlb_mask=0x5f in case of
num_tlb_lines=48, which will trim a setting of 0x30 (48) to 0x10.

Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/20200917113155.13438-2-nicoleotsuka@gmail.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/tegra-smmu.c