Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 140235
b: refs/heads/master
c: afeeb7c
h: refs/heads/master
i:
  140233: 24c9e67
  140231: 4f57670
v: v3
  • Loading branch information
Zhao, Yu authored and David Woodhouse committed Mar 25, 2009
1 parent f1ed896 commit bf1f66a
Show file tree
Hide file tree
Showing 2 changed files with 4 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: 4cf2e75d0bec15d945972b005056c4a8731b82cf
refs/heads/master: afeeb7cebbd223ffee303fd8de4ba97458b13581
4 changes: 3 additions & 1 deletion trunk/drivers/pci/intel-iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -718,15 +718,17 @@ static void dma_pte_clear_one(struct dmar_domain *domain, u64 addr)
static void dma_pte_clear_range(struct dmar_domain *domain, u64 start, u64 end)
{
int addr_width = agaw_to_width(domain->agaw);
int npages;

start &= (((u64)1) << addr_width) - 1;
end &= (((u64)1) << addr_width) - 1;
/* in case it's partial page */
start = PAGE_ALIGN(start);
end &= PAGE_MASK;
npages = (end - start) / VTD_PAGE_SIZE;

/* we don't need lock here, nobody else touches the iova range */
while (start < end) {
while (npages--) {
dma_pte_clear_one(domain, start);
start += VTD_PAGE_SIZE;
}
Expand Down

0 comments on commit bf1f66a

Please sign in to comment.