iommu/tegra: smmu: Compute PFN mask at runtime
iommu/tegra: smmu: Compute PFN mask at runtime

The SMMU on Tegra30 and Tegra114 supports addressing up to 4 GiB of
physical memory. On Tegra124 the addressable physical memory was
extended to 16 GiB. The page frame number stored in PTEs therefore
requires 20 or 22 bits, depending on SoC generation.

In order to cope with this, compute the proper value at runtime.

Reported-by: Joseph Lo <d44213d98a18a7239e4b0f73bdcf54c06ad0c083@nvidia.com>
Cc: Hiroshi Doyu <7e37d737f0c384c0dce297667d084735fade9098@nvidia.com>
Signed-off-by: Thierry Reding <3055038c414aef68bf32c33b8118623e7554e0f2@nvidia.com>
Signed-off-by: Joerg Roedel <61aff96566804ea1da8a65de5bcc892ce07caceb@suse.de>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs