[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1450822888-22590-14-git-send-email-joro@8bytes.org>
Date: Tue, 22 Dec 2015 23:21:18 +0100
From: Joerg Roedel <joro@...tes.org>
To: iommu@...ts.linux-foundation.org
Cc: linux-kernel@...r.kernel.org, joro@...tes.org, jroedel@...e.de
Subject: [PATCH 13/23] iommu/amd: Flush iommu tlb in dma_ops_free_addresses
From: Joerg Roedel <jroedel@...e.de>
Instead of setting need_flush, do the flush directly in
dma_ops_free_addresses.
Signed-off-by: Joerg Roedel <jroedel@...e.de>
---
drivers/iommu/amd_iommu.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
index a26cd76..62a4079 100644
--- a/drivers/iommu/amd_iommu.c
+++ b/drivers/iommu/amd_iommu.c
@@ -1648,8 +1648,10 @@ static void dma_ops_free_addresses(struct dma_ops_domain *dom,
return;
#endif
- if ((address >> APERTURE_RANGE_SHIFT) >= dom->next_index)
- dom->need_flush = true;
+ if (address + pages > range->next_bit) {
+ domain_flush_tlb(&dom->domain);
+ domain_flush_complete(&dom->domain);
+ }
address = (address % APERTURE_RANGE_SIZE) >> PAGE_SHIFT;
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists