diff options
author | Will Deacon <will.deacon@arm.com> | 2017-07-06 15:55:48 +0100 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2017-07-20 10:30:26 +0100 |
commit | 8e517e762a826d16451fb6ffb0a8722e4265582e (patch) | |
tree | 6cc0c59ccd7770892d5bddb8c23afc381c853d8c /drivers/iommu/mtk_iommu.h | |
parent | 5771a8c08880cdca3bfb4a3fc6d309d6bba20877 (diff) | |
download | linux-stable-8e517e762a826d16451fb6ffb0a8722e4265582e.tar.gz linux-stable-8e517e762a826d16451fb6ffb0a8722e4265582e.tar.bz2 linux-stable-8e517e762a826d16451fb6ffb0a8722e4265582e.zip |
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