aboutsummaryrefslogtreecommitdiffstats
path: root/mm/sparse.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/sparse.c')
-rw-r--r--mm/sparse.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/mm/sparse.c b/mm/sparse.c
index 893e5621c247..9079afe8f457 100644
--- a/mm/sparse.c
+++ b/mm/sparse.c
@@ -61,7 +61,7 @@ static struct mem_section *sparse_index_alloc(int nid)
61 return section; 61 return section;
62} 62}
63 63
64static int sparse_index_init(unsigned long section_nr, int nid) 64static int __meminit sparse_index_init(unsigned long section_nr, int nid)
65{ 65{
66 static DEFINE_SPINLOCK(index_init_lock); 66 static DEFINE_SPINLOCK(index_init_lock);
67 unsigned long root = SECTION_NR_TO_ROOT(section_nr); 67 unsigned long root = SECTION_NR_TO_ROOT(section_nr);
@@ -138,7 +138,7 @@ static inline int sparse_early_nid(struct mem_section *section)
138} 138}
139 139
140/* Record a memory area against a node. */ 140/* Record a memory area against a node. */
141void memory_present(int nid, unsigned long start, unsigned long end) 141void __init memory_present(int nid, unsigned long start, unsigned long end)
142{ 142{
143 unsigned long pfn; 143 unsigned long pfn;
144 144
@@ -197,7 +197,7 @@ struct page *sparse_decode_mem_map(unsigned long coded_mem_map, unsigned long pn
197 return ((struct page *)coded_mem_map) + section_nr_to_pfn(pnum); 197 return ((struct page *)coded_mem_map) + section_nr_to_pfn(pnum);
198} 198}
199 199
200static int sparse_init_one_section(struct mem_section *ms, 200static int __meminit sparse_init_one_section(struct mem_section *ms,
201 unsigned long pnum, struct page *mem_map) 201 unsigned long pnum, struct page *mem_map)
202{ 202{
203 if (!valid_section(ms)) 203 if (!valid_section(ms))
@@ -209,7 +209,7 @@ static int sparse_init_one_section(struct mem_section *ms,
209 return 1; 209 return 1;
210} 210}
211 211
212static struct page *sparse_early_mem_map_alloc(unsigned long pnum) 212static struct page __init *sparse_early_mem_map_alloc(unsigned long pnum)
213{ 213{
214 struct page *map; 214 struct page *map;
215 struct mem_section *ms = __nr_to_section(pnum); 215 struct mem_section *ms = __nr_to_section(pnum);
@@ -288,6 +288,7 @@ void __init sparse_init(void)
288 } 288 }
289} 289}
290 290
291#ifdef CONFIG_MEMORY_HOTPLUG
291/* 292/*
292 * returns the number of sections whose mem_maps were properly 293 * returns the number of sections whose mem_maps were properly
293 * set. If this is <=0, then that means that the passed-in 294 * set. If this is <=0, then that means that the passed-in
@@ -327,3 +328,4 @@ out:
327 __kfree_section_memmap(memmap, nr_pages); 328 __kfree_section_memmap(memmap, nr_pages);
328 return ret; 329 return ret;
329} 330}
331#endif