iommu/arm-smmu: fix bug in pmd construction
authorMitchel Humpherys <mitchelh@codeaurora.org>
Fri, 19 Sep 2014 21:58:42 +0000 (22:58 +0100)
committerHiroshi Doyu <hdoyu@nvidia.com>
Fri, 7 Nov 2014 17:33:01 +0000 (09:33 -0800)
commitbc4c4014a95ea6cb1c90c27baabd9e763073add0
tree3d46106e81876a1fe41001aae16ebd26073aa977
parent72cd7134931715419042f77991f15f3888425175
iommu/arm-smmu: fix bug in pmd construction

We are using the same pfn for every pte we create while constructing the
pmd. Fix this by actually updating the pfn on each iteration of the pmd
construction loop.

It's not clear if we can actually hit this bug right now since iommu_map
splits up the calls to .map based on the page size, so we only ever seem to
iterate this loop once. However, things might change in the future that
might cause us to hit this.

Change-Id: Ie3066a6c926486e5cbd18e2cb92522d28ae437b4
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
(cherry-picked from next-20141106)
Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com>
Reviewed-by: Sri Krishna Chowdary <schowdary@nvidia.com>
Reviewed-on: http://git-master/r/594889
drivers/iommu/arm-smmu.c