aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iommu
diff options
context:
space:
mode:
authorWill Deacon <will.deacon@arm.com>2014-03-13 07:46:57 -0400
committerWill Deacon <will.deacon@arm.com>2014-05-02 11:49:31 -0400
commitc44308413b92a555d1501a6c0db9489e288bb81b (patch)
treee5a41ace20b4c77f60519dfd515674ff3b3bd68c /drivers/iommu
parentd1db0eea852497762cab43b905b879dfcd3b8987 (diff)
iommu/arm-smmu: allow 42-bit stage-1 output size with 64K pages
The output size of stage-1 is currently limited by the input size of stage-2, which is further limited by VA_BITS since we make use of the standard pgd_alloc functions for creating page tables. This patch ensures that we use VA_BITS instead of a hardcoded '39' for the stage-1 output size limit. Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'drivers/iommu')
-rw-r--r--drivers/iommu/arm-smmu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c
index 647c3c7fd742..afcb0e3492cf 100644
--- a/drivers/iommu/arm-smmu.c
+++ b/drivers/iommu/arm-smmu.c
@@ -1804,7 +1804,7 @@ static int arm_smmu_device_cfg_probe(struct arm_smmu_device *smmu)
1804 * allocation (PTRS_PER_PGD). 1804 * allocation (PTRS_PER_PGD).
1805 */ 1805 */
1806#ifdef CONFIG_64BIT 1806#ifdef CONFIG_64BIT
1807 smmu->s1_output_size = min(39UL, size); 1807 smmu->s1_output_size = min((unsigned long)VA_BITS, size);
1808#else 1808#else
1809 smmu->s1_output_size = min(32UL, size); 1809 smmu->s1_output_size = min(32UL, size);
1810#endif 1810#endif