[PATCH] mm: add arch_alloc_page

Add an arch_alloc_page to match arch_free_page.

Signed-off-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
Nick Piggin 2006-12-06 20:32:00 -08:00 committed by Linus Torvalds
parent 7602bdf2fd
commit cc10250907
2 changed files with 5 additions and 0 deletions

View File

@ -116,6 +116,9 @@ static inline enum zone_type gfp_zone(gfp_t flags)
#ifndef HAVE_ARCH_FREE_PAGE #ifndef HAVE_ARCH_FREE_PAGE
static inline void arch_free_page(struct page *page, int order) { } static inline void arch_free_page(struct page *page, int order) { }
#endif #endif
#ifndef HAVE_ARCH_ALLOC_PAGE
static inline void arch_alloc_page(struct page *page, int order) { }
#endif
extern struct page * extern struct page *
FASTCALL(__alloc_pages(gfp_t, unsigned int, struct zonelist *)); FASTCALL(__alloc_pages(gfp_t, unsigned int, struct zonelist *));

View File

@ -598,6 +598,8 @@ static int prep_new_page(struct page *page, int order, gfp_t gfp_flags)
1 << PG_checked | 1 << PG_mappedtodisk); 1 << PG_checked | 1 << PG_mappedtodisk);
set_page_private(page, 0); set_page_private(page, 0);
set_page_refcounted(page); set_page_refcounted(page);
arch_alloc_page(page, order);
kernel_map_pages(page, 1 << order, 1); kernel_map_pages(page, 1 << order, 1);
if (gfp_flags & __GFP_ZERO) if (gfp_flags & __GFP_ZERO)