summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNick Piggin <npiggin@suse.de>2006-12-06 20:32:00 -0800
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-07 08:39:21 -0800
commitcc102509074bba0316f2b5deebd7ef4447da295e (patch)
tree44ac5fc0c0dd7a24e8925e680a03361f4722a5a6
parent7602bdf2fd14a40dd9b104e516fdc05e1bd17952 (diff)
downloadop-kernel-dev-cc102509074bba0316f2b5deebd7ef4447da295e.zip
op-kernel-dev-cc102509074bba0316f2b5deebd7ef4447da295e.tar.gz
[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>
-rw-r--r--include/linux/gfp.h3
-rw-r--r--mm/page_alloc.c2
2 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/gfp.h b/include/linux/gfp.h
index bf2b6bc..00c314a 100644
--- a/include/linux/gfp.h
+++ b/include/linux/gfp.h
@@ -116,6 +116,9 @@ static inline enum zone_type gfp_zone(gfp_t flags)
#ifndef HAVE_ARCH_FREE_PAGE
static inline void arch_free_page(struct page *page, int order) { }
#endif
+#ifndef HAVE_ARCH_ALLOC_PAGE
+static inline void arch_alloc_page(struct page *page, int order) { }
+#endif
extern struct page *
FASTCALL(__alloc_pages(gfp_t, unsigned int, struct zonelist *));
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 230771d..cd47e8f 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -598,6 +598,8 @@ static int prep_new_page(struct page *page, int order, gfp_t gfp_flags)
1 << PG_checked | 1 << PG_mappedtodisk);
set_page_private(page, 0);
set_page_refcounted(page);
+
+ arch_alloc_page(page, order);
kernel_map_pages(page, 1 << order, 1);
if (gfp_flags & __GFP_ZERO)
OpenPOWER on IntegriCloud