Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 87060
b: refs/heads/master
c: ab875cf
h: refs/heads/master
v: v3
  • Loading branch information
Ivan Kokshaysky authored and Linus Torvalds committed Mar 9, 2008
1 parent dd30180 commit e9c3baf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 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: 393d94d98b19089ec172566e23557997931b137e
refs/heads/master: ab875cf67e89eef150ae8d4ef09c361e47b6b398
15 changes: 7 additions & 8 deletions trunk/arch/alpha/kernel/pci_iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,15 +144,14 @@ iommu_arena_find_pages(struct device *dev, struct pci_iommu_arena *arena,
unsigned long base;
unsigned long boundary_size;

BUG_ON(arena->dma_base & ~PAGE_MASK);
base = arena->dma_base >> PAGE_SHIFT;
if (dev)
boundary_size = ALIGN(dma_get_max_seg_size(dev) + 1, PAGE_SIZE)
>> PAGE_SHIFT;
else
boundary_size = ALIGN(1UL << 32, PAGE_SIZE) >> PAGE_SHIFT;

BUG_ON(!is_power_of_2(boundary_size));
if (dev) {
boundary_size = dma_get_seg_boundary(dev) + 1;
BUG_ON(!is_power_of_2(boundary_size));
boundary_size >>= PAGE_SHIFT;
} else {
boundary_size = 1UL << (32 - PAGE_SHIFT);
}

/* Search forward for the first mask-aligned sequence of N free ptes */
ptes = arena->ptes;
Expand Down

0 comments on commit e9c3baf

Please sign in to comment.