iommu/arm-smmu-v3: Implement flush_iotlb_all hook
authorZhen Lei <thunder.leizhen@huawei.com>
Thu, 20 Sep 2018 16:10:21 +0000 (17:10 +0100)
committerWill Deacon <will.deacon@arm.com>
Mon, 1 Oct 2018 12:01:31 +0000 (13:01 +0100)
commit07fdef34d2be6811f00c6f9e4e2a1483cf86696c
tree9e7bbd16f780ce5aeaf04c70aceff2d7fae98375
parent901510ee32f7190902f6fe4affb463e5d86a804c
iommu/arm-smmu-v3: Implement flush_iotlb_all hook

.flush_iotlb_all is currently stubbed to arm_smmu_iotlb_sync() since the
only time it would ever need to actually do anything is for callers
doing their own explicit batching, e.g.:

iommu_unmap_fast(domain, ...);
iommu_unmap_fast(domain, ...);
iommu_iotlb_flush_all(domain, ...);

where since io-pgtable still issues the TLBI commands implicitly in the
unmap instead of implementing .iotlb_range_add, the "flush" only needs
to ensure completion of those already-in-flight invalidations.

However, we're about to start using it in anger with flush queues, so
let's get a proper implementation wired up.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
[rm: document why it wasn't a bug]
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
drivers/iommu/arm-smmu-v3.c