mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
alpha: convert IOMMU to use ALIGN()
This patch is preparation for modifications to fix the IOMMU segment boundary problem. Signed-off-by: FUJITA Tomonori <[email protected]> Cc: Richard Henderson <[email protected]> Cc: Ivan Kokshaysky <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
040922c04c
commit
3c5f1def7d
1 changed files with 3 additions and 3 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue