diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/ia64/mm/hugetlbpage.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/ia64/mm/hugetlbpage.c b/arch/ia64/mm/hugetlbpage.c index 1346b7f05397..d22861c5b04c 100644 --- a/arch/ia64/mm/hugetlbpage.c +++ b/arch/ia64/mm/hugetlbpage.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/pagemap.h> | 15 | #include <linux/pagemap.h> |
16 | #include <linux/slab.h> | 16 | #include <linux/slab.h> |
17 | #include <linux/sysctl.h> | 17 | #include <linux/sysctl.h> |
18 | #include <linux/log2.h> | ||
18 | #include <asm/mman.h> | 19 | #include <asm/mman.h> |
19 | #include <asm/pgalloc.h> | 20 | #include <asm/pgalloc.h> |
20 | #include <asm/tlb.h> | 21 | #include <asm/tlb.h> |
@@ -182,7 +183,7 @@ static int __init hugetlb_setup_sz(char *str) | |||
182 | tr_pages = 0x15557000UL; | 183 | tr_pages = 0x15557000UL; |
183 | 184 | ||
184 | size = memparse(str, &str); | 185 | size = memparse(str, &str); |
185 | if (*str || (size & (size-1)) || !(tr_pages & size) || | 186 | if (*str || !is_power_of_2(size) || !(tr_pages & size) || |
186 | size <= PAGE_SIZE || | 187 | size <= PAGE_SIZE || |
187 | size >= (1UL << PAGE_SHIFT << MAX_ORDER)) { | 188 | size >= (1UL << PAGE_SHIFT << MAX_ORDER)) { |
188 | printk(KERN_WARNING "Invalid huge page size specified\n"); | 189 | printk(KERN_WARNING "Invalid huge page size specified\n"); |