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