aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAl Viro <viro@ftp.linux.org.uk>2008-11-22 12:33:24 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2008-11-30 13:03:35 -0500
commit31168481c32c8a485e1003af9433124dede57f8d (patch)
tree0d0bb17b8f45cb3b176acc63dee4f2a57aaca500
parented313489badef16d700f5a3be50e8fd8f8294bc8 (diff)
meminit section warnings
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--include/linux/page_cgroup.h4
-rw-r--r--mm/memory_hotplug.c9
-rw-r--r--mm/page_cgroup.c13
-rw-r--r--mm/sparse.c2
4 files changed, 15 insertions, 13 deletions
diff --git a/include/linux/page_cgroup.h b/include/linux/page_cgroup.h
index f546ad6fc028..1e6d34bfa094 100644
--- a/include/linux/page_cgroup.h
+++ b/include/linux/page_cgroup.h
@@ -17,7 +17,7 @@ struct page_cgroup {
17 struct list_head lru; /* per cgroup LRU list */ 17 struct list_head lru; /* per cgroup LRU list */
18}; 18};
19 19
20void __init pgdat_page_cgroup_init(struct pglist_data *pgdat); 20void __meminit pgdat_page_cgroup_init(struct pglist_data *pgdat);
21void __init page_cgroup_init(void); 21void __init page_cgroup_init(void);
22struct page_cgroup *lookup_page_cgroup(struct page *page); 22struct page_cgroup *lookup_page_cgroup(struct page *page);
23 23
@@ -91,7 +91,7 @@ static inline void unlock_page_cgroup(struct page_cgroup *pc)
91#else /* CONFIG_CGROUP_MEM_RES_CTLR */ 91#else /* CONFIG_CGROUP_MEM_RES_CTLR */
92struct page_cgroup; 92struct page_cgroup;
93 93
94static inline void pgdat_page_cgroup_init(struct pglist_data *pgdat) 94static inline void __meminit pgdat_page_cgroup_init(struct pglist_data *pgdat)
95{ 95{
96} 96}
97 97
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
index b5b2b15085a8..b17371185468 100644
--- a/mm/memory_hotplug.c
+++ b/mm/memory_hotplug.c
@@ -189,7 +189,7 @@ static void grow_pgdat_span(struct pglist_data *pgdat, unsigned long start_pfn,
189 pgdat->node_start_pfn; 189 pgdat->node_start_pfn;
190} 190}
191 191
192static int __add_zone(struct zone *zone, unsigned long phys_start_pfn) 192static int __meminit __add_zone(struct zone *zone, unsigned long phys_start_pfn)
193{ 193{
194 struct pglist_data *pgdat = zone->zone_pgdat; 194 struct pglist_data *pgdat = zone->zone_pgdat;
195 int nr_pages = PAGES_PER_SECTION; 195 int nr_pages = PAGES_PER_SECTION;
@@ -216,7 +216,7 @@ static int __add_zone(struct zone *zone, unsigned long phys_start_pfn)
216 return 0; 216 return 0;
217} 217}
218 218
219static int __add_section(struct zone *zone, unsigned long phys_start_pfn) 219static int __meminit __add_section(struct zone *zone, unsigned long phys_start_pfn)
220{ 220{
221 int nr_pages = PAGES_PER_SECTION; 221 int nr_pages = PAGES_PER_SECTION;
222 int ret; 222 int ret;
@@ -273,7 +273,7 @@ static int __remove_section(struct zone *zone, struct mem_section *ms)
273 * call this function after deciding the zone to which to 273 * call this function after deciding the zone to which to
274 * add the new pages. 274 * add the new pages.
275 */ 275 */
276int __add_pages(struct zone *zone, unsigned long phys_start_pfn, 276int __ref __add_pages(struct zone *zone, unsigned long phys_start_pfn,
277 unsigned long nr_pages) 277 unsigned long nr_pages)
278{ 278{
279 unsigned long i; 279 unsigned long i;
@@ -470,7 +470,8 @@ static void rollback_node_hotadd(int nid, pg_data_t *pgdat)
470} 470}
471 471
472 472
473int add_memory(int nid, u64 start, u64 size) 473/* we are OK calling __meminit stuff here - we have CONFIG_MEMORY_HOTPLUG */
474int __ref add_memory(int nid, u64 start, u64 size)
474{ 475{
475 pg_data_t *pgdat = NULL; 476 pg_data_t *pgdat = NULL;
476 int new_pgdat = 0; 477 int new_pgdat = 0;
diff --git a/mm/page_cgroup.c b/mm/page_cgroup.c
index 1223d927904d..436c00229e70 100644
--- a/mm/page_cgroup.c
+++ b/mm/page_cgroup.c
@@ -21,7 +21,7 @@ static unsigned long total_usage;
21#if !defined(CONFIG_SPARSEMEM) 21#if !defined(CONFIG_SPARSEMEM)
22 22
23 23
24void __init pgdat_page_cgroup_init(struct pglist_data *pgdat) 24void __meminit pgdat_page_cgroup_init(struct pglist_data *pgdat)
25{ 25{
26 pgdat->node_page_cgroup = NULL; 26 pgdat->node_page_cgroup = NULL;
27} 27}
@@ -97,7 +97,8 @@ struct page_cgroup *lookup_page_cgroup(struct page *page)
97 return section->page_cgroup + pfn; 97 return section->page_cgroup + pfn;
98} 98}
99 99
100int __meminit init_section_page_cgroup(unsigned long pfn) 100/* __alloc_bootmem...() is protected by !slab_available() */
101int __init_refok init_section_page_cgroup(unsigned long pfn)
101{ 102{
102 struct mem_section *section; 103 struct mem_section *section;
103 struct page_cgroup *base, *pc; 104 struct page_cgroup *base, *pc;
@@ -158,7 +159,7 @@ void __free_page_cgroup(unsigned long pfn)
158 } 159 }
159} 160}
160 161
161int online_page_cgroup(unsigned long start_pfn, 162int __meminit online_page_cgroup(unsigned long start_pfn,
162 unsigned long nr_pages, 163 unsigned long nr_pages,
163 int nid) 164 int nid)
164{ 165{
@@ -183,7 +184,7 @@ int online_page_cgroup(unsigned long start_pfn,
183 return -ENOMEM; 184 return -ENOMEM;
184} 185}
185 186
186int offline_page_cgroup(unsigned long start_pfn, 187int __meminit offline_page_cgroup(unsigned long start_pfn,
187 unsigned long nr_pages, int nid) 188 unsigned long nr_pages, int nid)
188{ 189{
189 unsigned long start, end, pfn; 190 unsigned long start, end, pfn;
@@ -197,7 +198,7 @@ int offline_page_cgroup(unsigned long start_pfn,
197 198
198} 199}
199 200
200static int page_cgroup_callback(struct notifier_block *self, 201static int __meminit page_cgroup_callback(struct notifier_block *self,
201 unsigned long action, void *arg) 202 unsigned long action, void *arg)
202{ 203{
203 struct memory_notify *mn = arg; 204 struct memory_notify *mn = arg;
@@ -248,7 +249,7 @@ void __init page_cgroup_init(void)
248 " want\n"); 249 " want\n");
249} 250}
250 251
251void __init pgdat_page_cgroup_init(struct pglist_data *pgdat) 252void __meminit pgdat_page_cgroup_init(struct pglist_data *pgdat)
252{ 253{
253 return; 254 return;
254} 255}
diff --git a/mm/sparse.c b/mm/sparse.c
index 39db301b920d..083f5b63e7a8 100644
--- a/mm/sparse.c
+++ b/mm/sparse.c
@@ -570,7 +570,7 @@ static void free_section_usemap(struct page *memmap, unsigned long *usemap)
570 * set. If this is <=0, then that means that the passed-in 570 * set. If this is <=0, then that means that the passed-in
571 * map was not consumed and must be freed. 571 * map was not consumed and must be freed.
572 */ 572 */
573int sparse_add_one_section(struct zone *zone, unsigned long start_pfn, 573int __meminit sparse_add_one_section(struct zone *zone, unsigned long start_pfn,
574 int nr_pages) 574 int nr_pages)
575{ 575{
576 unsigned long section_nr = pfn_to_section_nr(start_pfn); 576 unsigned long section_nr = pfn_to_section_nr(start_pfn);