提交 3c5f1def 编写于 作者: F FUJITA Tomonori 提交者: Linus Torvalds

alpha: convert IOMMU to use ALIGN()

This patch is preparation for modifications to fix the IOMMU segment boundary
problem.
Signed-off-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 040922c0
......@@ -136,11 +136,11 @@ iommu_arena_find_pages(struct pci_iommu_arena *arena, long n, long mask)
/* Search forward for the first mask-aligned sequence of N free ptes */
ptes = arena->ptes;
nent = arena->size >> PAGE_SHIFT;
p = (arena->next_entry + mask) & ~mask;
p = ALIGN(arena->next_entry, mask + 1);
i = 0;
while (i < n && p+i < nent) {
if (ptes[p+i])
p = (p + i + 1 + mask) & ~mask, i = 0;
p = ALIGN(p + i + 1, mask + 1), i = 0;
else
i = i + 1;
}
......@@ -153,7 +153,7 @@ iommu_arena_find_pages(struct pci_iommu_arena *arena, long n, long mask)
p = 0, i = 0;
while (i < n && p+i < nent) {
if (ptes[p+i])
p = (p + i + 1 + mask) & ~mask, i = 0;
p = ALIGN(p + i + 1, mask + 1), i = 0;
else
i = i + 1;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册