Commit 01ad1c08 authored by Andi Kleen's avatar Andi Kleen Committed by Linus Torvalds

mm: export prep_compound_page to mm

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: default avatarAdam Litke <agl@us.ibm.com>
Signed-off-by: default avatarAndi Kleen <ak@suse.de>
Signed-off-by: default avatarNick Piggin <npiggin@suse.de>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent b54bbf7b
...@@ -16,6 +16,8 @@ ...@@ -16,6 +16,8 @@
void free_pgtables(struct mmu_gather *tlb, struct vm_area_struct *start_vma, void free_pgtables(struct mmu_gather *tlb, struct vm_area_struct *start_vma,
unsigned long floor, unsigned long ceiling); 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) static inline void set_page_count(struct page *page, int v)
{ {
atomic_set(&page->_count, v); atomic_set(&page->_count, v);
......
...@@ -264,7 +264,7 @@ static void free_compound_page(struct page *page) ...@@ -264,7 +264,7 @@ static void free_compound_page(struct page *page)
__free_pages_ok(page, compound_order(page)); __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 i;
int nr_pages = 1 << order; int nr_pages = 1 << order;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment