diff options
Diffstat (limited to 'arch/alpha/kernel')
-rw-r--r-- | arch/alpha/kernel/pci_iommu.c | 3 | ||||
-rw-r--r-- | arch/alpha/kernel/setup.c | 3 |
2 files changed, 4 insertions, 2 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; } diff --git a/arch/alpha/kernel/setup.c b/arch/alpha/kernel/setup.c index 915f26345c45..bd5e68cd61e8 100644 --- a/arch/alpha/kernel/setup.c +++ b/arch/alpha/kernel/setup.c @@ -43,6 +43,7 @@ #include <linux/notifier.h> #include <asm/setup.h> #include <asm/io.h> +#include <linux/log2.h> extern struct atomic_notifier_head panic_notifier_list; static int alpha_panic_event(struct notifier_block *, unsigned long, void *); @@ -1303,7 +1304,7 @@ external_cache_probe(int minsize, int width) long size = minsize, maxsize = MAX_BCACHE_SIZE * 2; if (maxsize > (max_low_pfn + 1) << PAGE_SHIFT) - maxsize = 1 << (floor_log2(max_low_pfn + 1) + PAGE_SHIFT); + maxsize = 1 << (ilog2(max_low_pfn + 1) + PAGE_SHIFT); /* Get the first block cached. */ read_mem_block(__va(0), stride, size); |