mm/page_alloc.c: use '__paginginit' instead of '__init'
authorChen Gang <gang.chen@asianux.com>
Wed, 11 Sep 2013 21:20:27 +0000 (14:20 -0700)
committer黄涛 <huangtao@rock-chips.com>
Wed, 17 Sep 2014 08:30:08 +0000 (16:30 +0800)
set_pageblock_order() may be called when memory hotplug, so need use
'__paginginit' instead of '__init'.

The related warning:

  The function __meminit .free_area_init_node() references
  a function __init .set_pageblock_order().
  If .set_pageblock_order is only used by .free_area_init_node then
  annotate .set_pageblock_order with a matching annotation.

Signed-off-by: Chen Gang <gang.chen@asianux.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit 15ca220e1a63af06e000691e4ae1beaba5430c32)

mm/page_alloc.c

index 699bd7742877fa9387c31914dc0560246a4b5533..bf6c9285013fb0372693ef82f75cdd50007b2620 100644 (file)
@@ -4551,7 +4551,7 @@ static inline void setup_usemap(struct pglist_data *pgdat, struct zone *zone,
 #ifdef CONFIG_HUGETLB_PAGE_SIZE_VARIABLE
 
 /* Initialise the number of pages represented by NR_PAGEBLOCK_BITS */
-void __init set_pageblock_order(void)
+void __paginginit set_pageblock_order(void)
 {
        unsigned int order;
 
@@ -4579,7 +4579,7 @@ void __init set_pageblock_order(void)
  * include/linux/pageblock-flags.h for the values of pageblock_order based on
  * the kernel config
  */
-void __init set_pageblock_order(void)
+void __paginginit set_pageblock_order(void)
 {
 }