X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=mm%2Fhugetlb.c;h=28a2980ee4359cb43bcc530c22e3906c5169dbab;hb=0ef89d25d3e390dfa7c46772907951744a4067dc;hp=d237a02eb2289774ded6ea2c0767f779d5b76e9b;hpb=3a4b7886ee59e122d359e1714ed89585a06645ad;p=linux-2.6 diff --git a/mm/hugetlb.c b/mm/hugetlb.c index d237a02eb2..28a2980ee4 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;