[linux-yocto] [PATCH 07/23] mm, hugetlb: mark some bootstrap functions as __init
Yang Shi
yang.shi at windriver.com
Wed Jul 30 19:16:11 PDT 2014
From: David Rientjes <rientjes at google.com>
commit f412c97abef71026d8192ca8efca231f1e3906b3 upstream
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 at google.com>
Reviewed-by: Michal Hocko <mhocko at suse.cz>
Cc: Joonsoo Kim <iamjoonsoo.kim at lge.com>
Reviewed-by: Davidlohr Bueso <davidlohr at hp.com>
Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
Signed-off-by: Yang Shi <yang.shi at windriver.com>
---
mm/hugetlb.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index ef3a024..7b117a5 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)
put_page(page); /* free it into the hugepage allocator */
}
-static void prep_compound_gigantic_page(struct page *page, unsigned long order)
+static void __init prep_compound_gigantic_page(struct page *page,
+ unsigned long order)
{
int i;
int nr_pages = 1 << order;
@@ -1320,7 +1321,7 @@ found:
return 1;
}
-static void prep_compound_huge_page(struct page *page, int order)
+static void __init prep_compound_huge_page(struct page *page, int order)
{
if (unlikely(order > (MAX_ORDER - 1)))
prep_compound_gigantic_page(page, order);
--
2.0.2
More information about the linux-yocto
mailing list