Commit d41ab098 authored by Joerg Roedel's avatar Joerg Roedel

iommu/amd: Flush iommu tlb in dma_ops_free_addresses

Instead of setting need_flush, do the flush directly in
dma_ops_free_addresses.
Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
parent ebaecb42
...@@ -1648,8 +1648,10 @@ static void dma_ops_free_addresses(struct dma_ops_domain *dom, ...@@ -1648,8 +1648,10 @@ static void dma_ops_free_addresses(struct dma_ops_domain *dom,
return; return;
#endif #endif
if ((address >> APERTURE_RANGE_SHIFT) >= dom->next_index) if (address + pages > range->next_bit) {
dom->need_flush = true; domain_flush_tlb(&dom->domain);
domain_flush_complete(&dom->domain);
}
address = (address % APERTURE_RANGE_SIZE) >> PAGE_SHIFT; address = (address % APERTURE_RANGE_SIZE) >> PAGE_SHIFT;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment