summaryrefslogtreecommitdiff
path: root/drivers/iommu/mtk_iommu.h
diff options
context:
space:
mode:
authorWill Deacon <will.deacon@arm.com>2017-07-06 17:55:48 +0300
committerWill Deacon <will.deacon@arm.com>2017-07-20 12:30:26 +0300
commit8e517e762a826d16451fb6ffb0a8722e4265582e (patch)
tree6cc0c59ccd7770892d5bddb8c23afc381c853d8c /drivers/iommu/mtk_iommu.h
parent5771a8c08880cdca3bfb4a3fc6d309d6bba20877 (diff)
downloadlinux-8e517e762a826d16451fb6ffb0a8722e4265582e.tar.xz
iommu/arm-smmu: Reintroduce locking around TLB sync operations
Commit 523d7423e21b ("iommu/arm-smmu: Remove io-pgtable spinlock") removed the locking used to serialise map/unmap calls into the io-pgtable code from the ARM SMMU driver. This is good for performance, but opens us up to a nasty race with TLB syncs because the TLB sync register is shared within a context bank (or even globally for stage-2 on SMMUv1). There are two cases to consider: 1. A CPU can be spinning on the completion of a TLB sync, take an interrupt which issues a subsequent TLB sync, and then report a timeout on return from the interrupt. 2. A CPU can be spinning on the completion of a TLB sync, but other CPUs can continuously issue additional TLB syncs in such a way that the backoff logic reports a timeout. Rather than fix this by spinning for completion of prior TLB syncs before issuing a new one (which may suffer from fairness issues on large systems), instead reintroduce locking around TLB sync operations in the ARM SMMU driver. Fixes: 523d7423e21b ("iommu/arm-smmu: Remove io-pgtable spinlock") Cc: Robin Murphy <robin.murphy@arm.com> Reported-by: Ray Jui <ray.jui@broadcom.com> Tested-by: Ray Jui <ray.jui@broadcom.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'drivers/iommu/mtk_iommu.h')
0 files changed, 0 insertions, 0 deletions