]> git.baikalelectronics.ru Git - kernel.git/commit
iommu/arm-smmu-v3: Fix ATC invalidation ordering wrt main TLBs
authorWill Deacon <will@kernel.org>
Tue, 20 Aug 2019 14:12:12 +0000 (15:12 +0100)
committerWill Deacon <will@kernel.org>
Wed, 21 Aug 2019 16:58:54 +0000 (17:58 +0100)
commit54b9f96646bc082bf0c8abc8784e74502480c43a
tree8b623153a9c66e9ad540d13f8dc9831e0626f1ad
parentadd54b2dfccaa5792dd68c605169e3891c86478c
iommu/arm-smmu-v3: Fix ATC invalidation ordering wrt main TLBs

When invalidating the ATC for an PCIe endpoint using ATS, we must take
care to complete invalidation of the main SMMU TLBs beforehand, otherwise
the device could immediately repopulate its ATC with stale translations.

Hooking the ATC invalidation into ->unmap() as we currently do does the
exact opposite: it ensures that the ATC is invalidated *before*  the
main TLBs, which is bogus.

Move ATC invalidation into the actual (leaf) invalidation routines so
that it is always called after completing main TLB invalidation.

Reviewed-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
drivers/iommu/arm-smmu-v3.c