diff options
Diffstat (limited to 'arch/x86/mm/hugetlbpage.c')
-rw-r--r-- | arch/x86/mm/hugetlbpage.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/mm/hugetlbpage.c b/arch/x86/mm/hugetlbpage.c index 42982b26e32b..740d7ac03a55 100644 --- a/arch/x86/mm/hugetlbpage.c +++ b/arch/x86/mm/hugetlbpage.c | |||
@@ -173,10 +173,10 @@ static __init int setup_hugepagesz(char *opt) | |||
173 | } | 173 | } |
174 | __setup("hugepagesz=", setup_hugepagesz); | 174 | __setup("hugepagesz=", setup_hugepagesz); |
175 | 175 | ||
176 | #ifdef CONFIG_CMA | 176 | #if (defined(CONFIG_MEMORY_ISOLATION) && defined(CONFIG_COMPACTION)) || defined(CONFIG_CMA) |
177 | static __init int gigantic_pages_init(void) | 177 | static __init int gigantic_pages_init(void) |
178 | { | 178 | { |
179 | /* With CMA we can allocate gigantic pages at runtime */ | 179 | /* With compaction or CMA we can allocate gigantic pages at runtime */ |
180 | if (cpu_has_gbpages && !size_to_hstate(1UL << PUD_SHIFT)) | 180 | if (cpu_has_gbpages && !size_to_hstate(1UL << PUD_SHIFT)) |
181 | hugetlb_add_hstate(PUD_SHIFT - PAGE_SHIFT); | 181 | hugetlb_add_hstate(PUD_SHIFT - PAGE_SHIFT); |
182 | return 0; | 182 | return 0; |