aboutsummaryrefslogtreecommitdiffstats
path: root/arch/alpha/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'arch/alpha/kernel')
-rw-r--r--arch/alpha/kernel/pci_iommu.c3
-rw-r--r--arch/alpha/kernel/setup.c3
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 @@
7#include <linux/pci.h> 7#include <linux/pci.h>
8#include <linux/slab.h> 8#include <linux/slab.h>
9#include <linux/bootmem.h> 9#include <linux/bootmem.h>
10#include <linux/log2.h>
10 11
11#include <asm/io.h> 12#include <asm/io.h>
12#include <asm/hwrpb.h> 13#include <asm/hwrpb.h>
@@ -53,7 +54,7 @@ size_for_memory(unsigned long max)
53{ 54{
54 unsigned long mem = max_low_pfn << PAGE_SHIFT; 55 unsigned long mem = max_low_pfn << PAGE_SHIFT;
55 if (mem < max) 56 if (mem < max)
56 max = 1UL << ceil_log2(mem); 57 max = roundup_pow_of_two(mem);
57 return max; 58 return max;
58} 59}
59 60
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 @@
43#include <linux/notifier.h> 43#include <linux/notifier.h>
44#include <asm/setup.h> 44#include <asm/setup.h>
45#include <asm/io.h> 45#include <asm/io.h>
46#include <linux/log2.h>
46 47
47extern struct atomic_notifier_head panic_notifier_list; 48extern struct atomic_notifier_head panic_notifier_list;
48static int alpha_panic_event(struct notifier_block *, unsigned long, void *); 49static int alpha_panic_event(struct notifier_block *, unsigned long, void *);
@@ -1303,7 +1304,7 @@ external_cache_probe(int minsize, int width)
1303 long size = minsize, maxsize = MAX_BCACHE_SIZE * 2; 1304 long size = minsize, maxsize = MAX_BCACHE_SIZE * 2;
1304 1305
1305 if (maxsize > (max_low_pfn + 1) << PAGE_SHIFT) 1306 if (maxsize > (max_low_pfn + 1) << PAGE_SHIFT)
1306 maxsize = 1 << (floor_log2(max_low_pfn + 1) + PAGE_SHIFT); 1307 maxsize = 1 << (ilog2(max_low_pfn + 1) + PAGE_SHIFT);
1307 1308
1308 /* Get the first block cached. */ 1309 /* Get the first block cached. */
1309 read_mem_block(__va(0), stride, size); 1310 read_mem_block(__va(0), stride, size);