diff options
author | Steve French <sfrench@us.ibm.com> | 2008-03-11 20:15:41 +0100 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2008-03-11 20:15:41 +0100 |
commit | 5b4d4771e2a56671c7f1c94edda427a1e3d6f111 (patch) | |
tree | 58718288a28cca121a94b681a7865473a10dfd64 /arch/alpha/kernel/pci_iommu.c | |
parent | [CIFS] cifs: replace remaining __FUNCTION__ occurrences (diff) | |
parent | Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86... (diff) | |
download | linux-5b4d4771e2a56671c7f1c94edda427a1e3d6f111.tar.xz linux-5b4d4771e2a56671c7f1c94edda427a1e3d6f111.zip |
Merge branch 'master' of /pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'arch/alpha/kernel/pci_iommu.c')
-rw-r--r-- | arch/alpha/kernel/pci_iommu.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/arch/alpha/kernel/pci_iommu.c b/arch/alpha/kernel/pci_iommu.c index be6fa105cd34..e07a23fc5b74 100644 --- a/arch/alpha/kernel/pci_iommu.c +++ b/arch/alpha/kernel/pci_iommu.c @@ -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; |