• Robin Murphy's avatar
    iommu/arm-smmu-v3: Use CMD_SYNC completion MSI · 37de98f8
    Robin Murphy authored
    As an IRQ, the CMD_SYNC interrupt is not particularly useful, not least
    because we often need to wait for sync completion within someone else's
    IRQ handler anyway. However, when the SMMU is both coherent and supports
    MSIs, we can have a lot more fun by not using it as an interrupt at all.
    Following the example suggested in the architecture and using a write
    targeting normal memory, we can let callers wait on a status variable
    outside the lock instead of having to stall the entire queue or even
    touch MMIO registers. Since multiple sync commands are guaranteed to
    complete in order, a simple incrementing sequence count is all we need
    to unambiguously support any realistic number of overlapping waiters.
    Signed-off-by: default avatarRobin Murphy <robin.murphy@arm.com>
    Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
    37de98f8
arm-smmu-v3.c 75.6 KB