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:21:48 +0100
commitc362201c51b92b382798a06c610ea599aff00673 (patch)
tree3b4201ef8819d3097f1a8ed0a69071a25417fc65 /drivers/iommu
parent48d127dbeee236a161cdb3e05055b2a8e645afe4 (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 0ad8b7c78a43..66a406e87e11 100644
--- a/drivers/iommu/amd_iommu.c
+++ b/drivers/iommu/amd_iommu.c
@@ -2184,6 +2184,8 @@ static int attach_device(struct device *dev,
*/
domain_flush_tlb_pde(domain);
+ domain_flush_complete(domain);
+
return ret;
}