]> Pileus Git - ~andy/linux/commit
iommu/arm-smmu: fix pud/pmd entry fill sequence
authorYifan Zhang <zhangyf@marvell.com>
Fri, 3 Jan 2014 12:01:26 +0000 (12:01 +0000)
committerWill Deacon <will.deacon@arm.com>
Mon, 10 Feb 2014 17:00:47 +0000 (17:00 +0000)
commit97a644208d1a08b7104d1fe2ace8cef011222711
tree8278f4f2db8fec61cd8d4c8c1edbaeefe74b7ba2
parentb28a960c42fcd9cfc987441fa6d1c1a471f0f9ed
iommu/arm-smmu: fix pud/pmd entry fill sequence

The ARM SMMU driver's population of puds and pmds is broken, since we
iterate over the next level of table repeatedly setting the current
level descriptor to point at the pmd being initialised. This is clearly
wrong when dealing with multiple pmds/puds.

This patch fixes the problem by moving the pud/pmd population out of the
loop and instead performing it when we allocate the next level (like we
correctly do for ptes already). The starting address for the next level
is then calculated prior to entering the loop.

Cc: <stable@vger.kernel.org>
Signed-off-by: Yifan Zhang <zhangyf@marvell.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
drivers/iommu/arm-smmu.c