iommu/arm-smmu: Ensure that page-table updates are visible before TLBI
authorWill Deacon <will.deacon@arm.com>
Mon, 1 Oct 2018 11:42:49 +0000 (12:42 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 13 Nov 2018 19:08:51 +0000 (11:08 -0800)
commit14dd2a14e8b776db648c9ae3634f8ebe930adeaf
tree2c9e59de073bb55e545fe4ff021089bb09f00138
parent32396672cbc6a72c0c5d892f71f4c35906430ad9
iommu/arm-smmu: Ensure that page-table updates are visible before TLBI

commit 7d321bd3542500caf125249f44dc37cb4e738013 upstream.

The IO-pgtable code relies on the driver TLB invalidation callbacks to
ensure that all page-table updates are visible to the IOMMU page-table
walker.

In the case that the page-table walker is cache-coherent, we cannot rely
on an implicit DSB from the DMA-mapping code, so we must ensure that we
execute a DSB in our tlb_add_flush() callback prior to triggering the
invalidation.

Cc: <stable@vger.kernel.org>
Cc: Robin Murphy <robin.murphy@arm.com>
Fixes: 2df7a25ce4a7 ("iommu/arm-smmu: Clean up DMA API usage")
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iommu/arm-smmu.c