aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Rientjes <rientjes@google.com>2014-04-03 17:47:59 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-04-03 19:21:01 -0400
commitf412c97abef71026d8192ca8efca231f1e3906b3 (patch)
treeec1e20ef6819ddacb0d0e30f3b60f0f7eb5e9aa2
parent449dd6984d0e47643c04c807f609dd56d48d5bcc (diff)
mm, hugetlb: mark some bootstrap functions as __init
Both prep_compound_huge_page() and prep_compound_gigantic_page() are only called at bootstrap and can be marked as __init. The __SetPageTail(page) in prep_compound_gigantic_page() happening before page->first_page is initialized is not concerning since this is bootstrap. Signed-off-by: David Rientjes <rientjes@google.com> Reviewed-by: Michal Hocko <mhocko@suse.cz> Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com> Reviewed-by: Davidlohr Bueso <davidlohr@hp.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--mm/hugetlb.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index 38d9bed88dc8..7c02b9dadfb0 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -689,7 +689,8 @@ static void prep_new_huge_page(struct hstate *h, struct page *page, int nid)
689 put_page(page); /* free it into the hugepage allocator */ 689 put_page(page); /* free it into the hugepage allocator */
690} 690}
691 691
692static void prep_compound_gigantic_page(struct page *page, unsigned long order) 692static void __init prep_compound_gigantic_page(struct page *page,
693 unsigned long order)
693{ 694{
694 int i; 695 int i;
695 int nr_pages = 1 << order; 696 int nr_pages = 1 << order;
@@ -1319,7 +1320,7 @@ found:
1319 return 1; 1320 return 1;
1320} 1321}
1321 1322
1322static void prep_compound_huge_page(struct page *page, int order) 1323static void __init prep_compound_huge_page(struct page *page, int order)
1323{ 1324{
1324 if (unlikely(order > (MAX_ORDER - 1))) 1325 if (unlikely(order > (MAX_ORDER - 1)))
1325 prep_compound_gigantic_page(page, order); 1326 prep_compound_gigantic_page(page, order);