• Robin Murphy's avatar
    iommu/io-pgtable-arm-v7s: Support lockless operation · 119ff305
    Robin Murphy authored
    Mirroring the LPAE implementation, rework the v7s code to be robust
    against concurrent operations. The same two potential races exist, and
    are solved in the same manner, with the fixed 2-level structure making
    life ever so slightly simpler.
    
    What complicates matters compared to LPAE, however, is large page
    entries, since we can't update a block of 16 PTEs atomically, nor assume
    available software bits to do clever things with. As most users are
    never likely to do partial unmaps anyway (due to DMA API rules), it
    doesn't seem unreasonable for this case to remain behind a serialising
    lock; we just pull said lock down into the bowels of the implementation
    so it's well out of the way of the normal call paths.
    Signed-off-by: default avatarRobin Murphy <robin.murphy@arm.com>
    Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
    119ff305
io-pgtable-arm-v7s.c 25.2 KB