summaryrefslogtreecommitdiff
path: root/drivers/iommu
diff options
context:
space:
mode:
authorFilippo Sironi <sironi@amazon.de>2019-09-10 19:49:21 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-01-29 10:24:32 +0100
commita9e0dcfe6b194dc5fd5703da91e0fd383419f234 (patch)
treead066a39e18b9f9ac951fecb6a0e23d76b3d057c /drivers/iommu
parentcfae028fd3a9266f50fd39a0745b36d1a690af7d (diff)
iommu/amd: Wait for completion of IOTLB flush in attach_device
[ Upstream commit 0b15e02f0cc4fb34a9160de7ba6db3a4013dc1b7 ] To make sure the domain tlb flush completes before the function returns, explicitly wait for its completion. Signed-off-by: Filippo Sironi <sironi@amazon.de> Fixes: 42a49f965a8d ("amd-iommu: flush domain tlb when attaching a new device") [joro: Added commit message and fixes tag] Signed-off-by: Joerg Roedel <jroedel@suse.de> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/iommu')
-rw-r--r--drivers/iommu/amd_iommu.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
index c898c70472bb..bb0448c91f67 100644
--- a/drivers/iommu/amd_iommu.c
+++ b/drivers/iommu/amd_iommu.c
@@ -2113,6 +2113,8 @@ skip_ats_check:
*/
domain_flush_tlb_pde(domain);
+ domain_flush_complete(domain);
+
return ret;
}