]> git.baikalelectronics.ru Git - 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)
commit4ad0c119557639493089310d2b26e941a8b5feb5
treebec5d901505368a1a229f2e1802d773e70c705a3
parentb7de50a469143f791e6262f0b08c222af95b829e
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