• Yifan Zhang's avatar
    iommu/arm-smmu: fix pud/pmd entry fill sequence · 97a64420
    Yifan Zhang authored
    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: default avatarYifan Zhang <zhangyf@marvell.com>
    Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
    97a64420
arm-smmu.c 52 KB