aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
Diffstat (limited to 'mm')
-rw-r--r--mm/internal.h13
-rw-r--r--mm/page_alloc.c4
2 files changed, 15 insertions, 2 deletions
diff --git a/mm/internal.h b/mm/internal.h
index 5a9a6200e034..789727309f4d 100644
--- a/mm/internal.h
+++ b/mm/internal.h
@@ -47,4 +47,17 @@ static inline unsigned long page_order(struct page *page)
47 VM_BUG_ON(!PageBuddy(page)); 47 VM_BUG_ON(!PageBuddy(page));
48 return page_private(page); 48 return page_private(page);
49} 49}
50
51/*
52 * FLATMEM and DISCONTIGMEM configurations use alloc_bootmem_node,
53 * so all functions starting at paging_init should be marked __init
54 * in those cases. SPARSEMEM, however, allows for memory hotplug,
55 * and alloc_bootmem_node is not used.
56 */
57#ifdef CONFIG_SPARSEMEM
58#define __paginginit __meminit
59#else
60#define __paginginit __init
61#endif
62
50#endif 63#endif
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 75b979313346..8896e874a67d 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -3314,7 +3314,7 @@ static inline int pageblock_default_order(unsigned int order)
3314 * - mark all memory queues empty 3314 * - mark all memory queues empty
3315 * - clear the memory bitmaps 3315 * - clear the memory bitmaps
3316 */ 3316 */
3317static void __meminit free_area_init_core(struct pglist_data *pgdat, 3317static void __paginginit free_area_init_core(struct pglist_data *pgdat,
3318 unsigned long *zones_size, unsigned long *zholes_size) 3318 unsigned long *zones_size, unsigned long *zholes_size)
3319{ 3319{
3320 enum zone_type j; 3320 enum zone_type j;
@@ -3438,7 +3438,7 @@ static void __init_refok alloc_node_mem_map(struct pglist_data *pgdat)
3438#endif /* CONFIG_FLAT_NODE_MEM_MAP */ 3438#endif /* CONFIG_FLAT_NODE_MEM_MAP */
3439} 3439}
3440 3440
3441void __meminit free_area_init_node(int nid, struct pglist_data *pgdat, 3441void __paginginit free_area_init_node(int nid, struct pglist_data *pgdat,
3442 unsigned long *zones_size, unsigned long node_start_pfn, 3442 unsigned long *zones_size, unsigned long node_start_pfn,
3443 unsigned long *zholes_size) 3443 unsigned long *zholes_size)
3444{ 3444{