summaryrefslogtreecommitdiff
path: root/arch/alpha/kernel/pci_iommu.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@twiddle.net>2007-05-29 16:01:35 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-30 10:07:54 -0700
commit74fd1b687fbeba566ceb59cc1fdbc7a64c5e0c0b (patch)
treeefc6ffd2080ec94bef934758f40c220d710adf28 /arch/alpha/kernel/pci_iommu.c
parentf54496f55a729078e9eef90bf9e0783857a27db1 (diff)
downloadlwn-74fd1b687fbeba566ceb59cc1fdbc7a64c5e0c0b.tar.gz
lwn-74fd1b687fbeba566ceb59cc1fdbc7a64c5e0c0b.zip
alpha: cleanup in bitops.h
Remove 2 functions private to the alpha implemetation, in favor of similar functions in <linux/log2.h>. Provide a more efficient version of the fls64 function for pre-ev67 alphas. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/alpha/kernel/pci_iommu.c')
-rw-r--r--arch/alpha/kernel/pci_iommu.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/alpha/kernel/pci_iommu.c b/arch/alpha/kernel/pci_iommu.c
index 6e7d1fe6e935..28c84e55feb9 100644
--- a/arch/alpha/kernel/pci_iommu.c
+++ b/arch/alpha/kernel/pci_iommu.c
@@ -7,6 +7,7 @@
#include <linux/pci.h>
#include <linux/slab.h>
#include <linux/bootmem.h>
+#include <linux/log2.h>
#include <asm/io.h>
#include <asm/hwrpb.h>
@@ -53,7 +54,7 @@ size_for_memory(unsigned long max)
{
unsigned long mem = max_low_pfn << PAGE_SHIFT;
if (mem < max)
- max = 1UL << ceil_log2(mem);
+ max = roundup_pow_of_two(mem);
return max;
}