Skip to content

Commit cc10250

Browse files
Nick PigginLinus Torvalds
authored andcommitted
[PATCH] mm: add arch_alloc_page
Add an arch_alloc_page to match arch_free_page. Signed-off-by: Nick Piggin <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 7602bdf commit cc10250

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

include/linux/gfp.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,9 @@ static inline enum zone_type gfp_zone(gfp_t flags)
116116
#ifndef HAVE_ARCH_FREE_PAGE
117117
static inline void arch_free_page(struct page *page, int order) { }
118118
#endif
119+
#ifndef HAVE_ARCH_ALLOC_PAGE
120+
static inline void arch_alloc_page(struct page *page, int order) { }
121+
#endif
119122

120123
extern struct page *
121124
FASTCALL(__alloc_pages(gfp_t, unsigned int, struct zonelist *));

mm/page_alloc.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -598,6 +598,8 @@ static int prep_new_page(struct page *page, int order, gfp_t gfp_flags)
598598
1 << PG_checked | 1 << PG_mappedtodisk);
599599
set_page_private(page, 0);
600600
set_page_refcounted(page);
601+
602+
arch_alloc_page(page, order);
601603
kernel_map_pages(page, 1 << order, 1);
602604

603605
if (gfp_flags & __GFP_ZERO)

0 commit comments

Comments
 (0)