Skip to content

Commit

Permalink
mm: export prep_compound_page to mm
Browse files Browse the repository at this point in the history
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 <agl@us.ibm.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Andi Kleen authored and torvalds committed Jul 24, 2008
1 parent b54bbf7 commit 01ad1c0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions mm/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion mm/page_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ static void free_compound_page(struct page *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 nr_pages = 1 << order;
Expand Down

0 comments on commit 01ad1c0

Please sign in to comment.