Commit 31168481 authored by Al Viro's avatar Al Viro Committed by Linus Torvalds

meminit section warnings

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent ed313489
...@@ -17,7 +17,7 @@ struct page_cgroup { ...@@ -17,7 +17,7 @@ struct page_cgroup {
struct list_head lru; /* per cgroup LRU list */ struct list_head lru; /* per cgroup LRU list */
}; };
void __init pgdat_page_cgroup_init(struct pglist_data *pgdat); void __meminit pgdat_page_cgroup_init(struct pglist_data *pgdat);
void __init page_cgroup_init(void); void __init page_cgroup_init(void);
struct page_cgroup *lookup_page_cgroup(struct page *page); struct page_cgroup *lookup_page_cgroup(struct page *page);
...@@ -91,7 +91,7 @@ static inline void unlock_page_cgroup(struct page_cgroup *pc) ...@@ -91,7 +91,7 @@ static inline void unlock_page_cgroup(struct page_cgroup *pc)
#else /* CONFIG_CGROUP_MEM_RES_CTLR */ #else /* CONFIG_CGROUP_MEM_RES_CTLR */
struct page_cgroup; struct page_cgroup;
static inline void pgdat_page_cgroup_init(struct pglist_data *pgdat) static inline void __meminit pgdat_page_cgroup_init(struct pglist_data *pgdat)
{ {
} }
......
...@@ -189,7 +189,7 @@ static void grow_pgdat_span(struct pglist_data *pgdat, unsigned long start_pfn, ...@@ -189,7 +189,7 @@ static void grow_pgdat_span(struct pglist_data *pgdat, unsigned long start_pfn,
pgdat->node_start_pfn; pgdat->node_start_pfn;
} }
static int __add_zone(struct zone *zone, unsigned long phys_start_pfn) static int __meminit __add_zone(struct zone *zone, unsigned long phys_start_pfn)
{ {
struct pglist_data *pgdat = zone->zone_pgdat; struct pglist_data *pgdat = zone->zone_pgdat;
int nr_pages = PAGES_PER_SECTION; int nr_pages = PAGES_PER_SECTION;
...@@ -216,7 +216,7 @@ static int __add_zone(struct zone *zone, unsigned long phys_start_pfn) ...@@ -216,7 +216,7 @@ static int __add_zone(struct zone *zone, unsigned long phys_start_pfn)
return 0; return 0;
} }
static int __add_section(struct zone *zone, unsigned long phys_start_pfn) static int __meminit __add_section(struct zone *zone, unsigned long phys_start_pfn)
{ {
int nr_pages = PAGES_PER_SECTION; int nr_pages = PAGES_PER_SECTION;
int ret; int ret;
...@@ -273,7 +273,7 @@ static int __remove_section(struct zone *zone, struct mem_section *ms) ...@@ -273,7 +273,7 @@ static int __remove_section(struct zone *zone, struct mem_section *ms)
* call this function after deciding the zone to which to * call this function after deciding the zone to which to
* add the new pages. * add the new pages.
*/ */
int __add_pages(struct zone *zone, unsigned long phys_start_pfn, int __ref __add_pages(struct zone *zone, unsigned long phys_start_pfn,
unsigned long nr_pages) unsigned long nr_pages)
{ {
unsigned long i; unsigned long i;
...@@ -470,7 +470,8 @@ static void rollback_node_hotadd(int nid, pg_data_t *pgdat) ...@@ -470,7 +470,8 @@ static void rollback_node_hotadd(int nid, pg_data_t *pgdat)
} }
int add_memory(int nid, u64 start, u64 size) /* we are OK calling __meminit stuff here - we have CONFIG_MEMORY_HOTPLUG */
int __ref add_memory(int nid, u64 start, u64 size)
{ {
pg_data_t *pgdat = NULL; pg_data_t *pgdat = NULL;
int new_pgdat = 0; int new_pgdat = 0;
......
...@@ -21,7 +21,7 @@ static unsigned long total_usage; ...@@ -21,7 +21,7 @@ static unsigned long total_usage;
#if !defined(CONFIG_SPARSEMEM) #if !defined(CONFIG_SPARSEMEM)
void __init pgdat_page_cgroup_init(struct pglist_data *pgdat) void __meminit pgdat_page_cgroup_init(struct pglist_data *pgdat)
{ {
pgdat->node_page_cgroup = NULL; pgdat->node_page_cgroup = NULL;
} }
...@@ -97,7 +97,8 @@ struct page_cgroup *lookup_page_cgroup(struct page *page) ...@@ -97,7 +97,8 @@ struct page_cgroup *lookup_page_cgroup(struct page *page)
return section->page_cgroup + pfn; return section->page_cgroup + pfn;
} }
int __meminit init_section_page_cgroup(unsigned long pfn) /* __alloc_bootmem...() is protected by !slab_available() */
int __init_refok init_section_page_cgroup(unsigned long pfn)
{ {
struct mem_section *section; struct mem_section *section;
struct page_cgroup *base, *pc; struct page_cgroup *base, *pc;
...@@ -158,7 +159,7 @@ void __free_page_cgroup(unsigned long pfn) ...@@ -158,7 +159,7 @@ void __free_page_cgroup(unsigned long pfn)
} }
} }
int online_page_cgroup(unsigned long start_pfn, int __meminit online_page_cgroup(unsigned long start_pfn,
unsigned long nr_pages, unsigned long nr_pages,
int nid) int nid)
{ {
...@@ -183,7 +184,7 @@ int online_page_cgroup(unsigned long start_pfn, ...@@ -183,7 +184,7 @@ int online_page_cgroup(unsigned long start_pfn,
return -ENOMEM; return -ENOMEM;
} }
int offline_page_cgroup(unsigned long start_pfn, int __meminit offline_page_cgroup(unsigned long start_pfn,
unsigned long nr_pages, int nid) unsigned long nr_pages, int nid)
{ {
unsigned long start, end, pfn; unsigned long start, end, pfn;
...@@ -197,7 +198,7 @@ int offline_page_cgroup(unsigned long start_pfn, ...@@ -197,7 +198,7 @@ int offline_page_cgroup(unsigned long start_pfn,
} }
static int page_cgroup_callback(struct notifier_block *self, static int __meminit page_cgroup_callback(struct notifier_block *self,
unsigned long action, void *arg) unsigned long action, void *arg)
{ {
struct memory_notify *mn = arg; struct memory_notify *mn = arg;
...@@ -248,7 +249,7 @@ void __init page_cgroup_init(void) ...@@ -248,7 +249,7 @@ void __init page_cgroup_init(void)
" want\n"); " want\n");
} }
void __init pgdat_page_cgroup_init(struct pglist_data *pgdat) void __meminit pgdat_page_cgroup_init(struct pglist_data *pgdat)
{ {
return; return;
} }
......
...@@ -570,7 +570,7 @@ static void free_section_usemap(struct page *memmap, unsigned long *usemap) ...@@ -570,7 +570,7 @@ static void free_section_usemap(struct page *memmap, unsigned long *usemap)
* set. If this is <=0, then that means that the passed-in * set. If this is <=0, then that means that the passed-in
* map was not consumed and must be freed. * map was not consumed and must be freed.
*/ */
int sparse_add_one_section(struct zone *zone, unsigned long start_pfn, int __meminit sparse_add_one_section(struct zone *zone, unsigned long start_pfn,
int nr_pages) int nr_pages)
{ {
unsigned long section_nr = pfn_to_section_nr(start_pfn); unsigned long section_nr = pfn_to_section_nr(start_pfn);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment