Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 118536
b: refs/heads/master
c: 80be308
h: refs/heads/master
v: v3
  • Loading branch information
Joerg Roedel committed Nov 6, 2008
1 parent 350bf42 commit ee63f21
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ae9b9403644f3ecc76867af042e7e1cfd5c099d0
refs/heads/master: 80be308dfa3798c7bad0fc81760b2faf83870e91
7 changes: 6 additions & 1 deletion trunk/arch/x86/kernel/amd_iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,9 @@ static void dma_ops_free_addresses(struct dma_ops_domain *dom,
{
address >>= PAGE_SHIFT;
iommu_area_free(dom->bitmap, address, pages);

if (address + pages >= dom->next_bit)
dom->need_flush = true;
}

/****************************************************************************
Expand Down Expand Up @@ -981,8 +984,10 @@ static void __unmap_single(struct amd_iommu *iommu,

dma_ops_free_addresses(dma_dom, dma_addr, pages);

if (amd_iommu_unmap_flush)
if (amd_iommu_unmap_flush || dma_dom->need_flush) {
iommu_flush_pages(iommu, dma_dom->domain.id, dma_addr, size);
dma_dom->need_flush = false;
}
}

/*
Expand Down

0 comments on commit ee63f21

Please sign in to comment.