diff options
Diffstat (limited to 'mm/hugetlb.c')
-rw-r--r-- | mm/hugetlb.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 254ce2b90158..28a2980ee435 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c | |||
@@ -17,7 +17,7 @@ | |||
17 | #include <linux/mutex.h> | 17 | #include <linux/mutex.h> |
18 | #include <linux/bootmem.h> | 18 | #include <linux/bootmem.h> |
19 | #include <linux/sysfs.h> | 19 | #include <linux/sysfs.h> |
20 | 20 | #include <asm/io.h> | |
21 | #include <asm/page.h> | 21 | #include <asm/page.h> |
22 | #include <asm/pgtable.h> | 22 | #include <asm/pgtable.h> |
23 | #include <asm/io.h> | 23 | #include <asm/io.h> |
@@ -1283,7 +1283,12 @@ module_exit(hugetlb_exit); | |||
1283 | 1283 | ||
1284 | static int __init hugetlb_init(void) | 1284 | static int __init hugetlb_init(void) |
1285 | { | 1285 | { |
1286 | BUILD_BUG_ON(HPAGE_SHIFT == 0); | 1286 | /* Some platform decide whether they support huge pages at boot |
1287 | * time. On these, such as powerpc, HPAGE_SHIFT is set to 0 when | ||
1288 | * there is no such support | ||
1289 | */ | ||
1290 | if (HPAGE_SHIFT == 0) | ||
1291 | return 0; | ||
1287 | 1292 | ||
1288 | if (!size_to_hstate(default_hstate_size)) { | 1293 | if (!size_to_hstate(default_hstate_size)) { |
1289 | default_hstate_size = HPAGE_SIZE; | 1294 | default_hstate_size = HPAGE_SIZE; |