aboutsummaryrefslogtreecommitdiff
path: root/mm/hugetlb.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-08-11 13:40:56 +0200
committerIngo Molnar <mingo@elte.hu>2008-08-11 13:40:56 +0200
commit251a169c69d1ff07cee7a9bb9fc4faff6b1d2ac3 (patch)
tree3c20c3e080f276848f2ad67aadab44a5d64bfda9 /mm/hugetlb.c
parent6679ce6e5f519096612b480d255d9ca97be0c2be (diff)
parent796aadeb1b2db9b5d463946766c5bbfd7717158c (diff)
Merge branch 'linus' into sched/urgent
Diffstat (limited to 'mm/hugetlb.c')
-rw-r--r--mm/hugetlb.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index 254ce2b9015..757ca983fd9 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -1283,7 +1283,12 @@ module_exit(hugetlb_exit);
static int __init hugetlb_init(void)
{
- BUILD_BUG_ON(HPAGE_SHIFT == 0);
+ /* Some platform decide whether they support huge pages at boot
+ * time. On these, such as powerpc, HPAGE_SHIFT is set to 0 when
+ * there is no such support
+ */
+ if (HPAGE_SHIFT == 0)
+ return 0;
if (!size_to_hstate(default_hstate_size)) {
default_hstate_size = HPAGE_SIZE;