diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-06-27 10:04:02 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-06-27 10:04:02 -0700 |
commit | b75ae8603568ae18f270213693758c78fb8a29ff (patch) | |
tree | 15e6c100baadcbce6b7f9f00d50de8c2b7da4c01 /arch/ia64/mm/hugetlbpage.c | |
parent | 75ca0d22668a36fc83e17407d369b528a22c562c (diff) | |
parent | 1ee27a4eedf3cc08245d395936c1bfaf80c074cc (diff) |
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
[IA64] Make SN2 PCI code use ioremap rather than manually mangle the address
[IA64] Force error to surface in nofault code
[IA64] change sh_change_coherence oemcall to use nolock
[IA64] remove duplicate header include line
[IA64] Correct unwind validation code
[IA64] is_power_of_2-ia64/mm/hugetlbpage.c
Diffstat (limited to 'arch/ia64/mm/hugetlbpage.c')
-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 1346b7f0539..d22861c5b04 100644 --- a/arch/ia64/mm/hugetlbpage.c +++ b/arch/ia64/mm/hugetlbpage.c @@ -15,6 +15,7 @@ #include <linux/pagemap.h> #include <linux/slab.h> #include <linux/sysctl.h> +#include <linux/log2.h> #include <asm/mman.h> #include <asm/pgalloc.h> #include <asm/tlb.h> @@ -182,7 +183,7 @@ static int __init hugetlb_setup_sz(char *str) tr_pages = 0x15557000UL; size = memparse(str, &str); - if (*str || (size & (size-1)) || !(tr_pages & size) || + if (*str || !is_power_of_2(size) || !(tr_pages & size) || size <= PAGE_SIZE || size >= (1UL << PAGE_SHIFT << MAX_ORDER)) { printk(KERN_WARNING "Invalid huge page size specified\n"); |