]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
iommu/arm-smmu-v3: Use CMD_SYNC completion MSI
authorRobin Murphy <robin.murphy@arm.com>
Wed, 18 Oct 2017 14:04:26 +0000 (15:04 +0100)
committerWill Deacon <will.deacon@arm.com>
Fri, 20 Oct 2017 15:55:08 +0000 (16:55 +0100)
commit37de98f8f1cf330918b242cd3ce13751857243a6
treebec5d901505368a1a229f2e1802d773e70c705a3
parentdce032a15ced2ee9fa58ed7b52c492795d096a40
iommu/arm-smmu-v3: Use CMD_SYNC completion MSI

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: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
drivers/iommu/arm-smmu-v3.c