From: Nick Piggin hugetlb will need to get compound pages from bootmem to handle the case of them being greater than or equal to MAX_ORDER. Export the constructor function needed for this. Acked-by: Adam Litke Signed-off-by: Andi Kleen Signed-off-by: Nick Piggin Signed-off-by: Andrew Morton --- mm/internal.h | 2 ++ mm/page_alloc.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff -puN mm/internal.h~mm-export-prep_compound_page-to-mm mm/internal.h --- a/mm/internal.h~mm-export-prep_compound_page-to-mm +++ a/mm/internal.h @@ -16,6 +16,8 @@ void free_pgtables(struct mmu_gather *tlb, struct vm_area_struct *start_vma, unsigned long floor, unsigned long ceiling); +extern void prep_compound_page(struct page *page, unsigned long order); + static inline void set_page_count(struct page *page, int v) { atomic_set(&page->_count, v); diff -puN mm/page_alloc.c~mm-export-prep_compound_page-to-mm mm/page_alloc.c --- a/mm/page_alloc.c~mm-export-prep_compound_page-to-mm +++ a/mm/page_alloc.c @@ -273,7 +273,7 @@ static void free_compound_page(struct pa __free_pages_ok(page, compound_order(page)); } -static void prep_compound_page(struct page *page, unsigned long order) +void prep_compound_page(struct page *page, unsigned long order) { int i; int nr_pages = 1 << order; _