aboutsummaryrefslogtreecommitdiffstats
path: root/mm/sparse.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/sparse.c')
-rw-r--r--mm/sparse.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/mm/sparse.c b/mm/sparse.c
index 9b6b93a4d78d..22896d589133 100644
--- a/mm/sparse.c
+++ b/mm/sparse.c
@@ -439,6 +439,7 @@ void __init sparse_mem_maps_populate_node(struct page **map_map,
439} 439}
440#endif /* !CONFIG_SPARSEMEM_VMEMMAP */ 440#endif /* !CONFIG_SPARSEMEM_VMEMMAP */
441 441
442#ifdef CONFIG_SPARSEMEM_ALLOC_MEM_MAP_TOGETHER
442static void __init sparse_early_mem_maps_alloc_node(struct page **map_map, 443static void __init sparse_early_mem_maps_alloc_node(struct page **map_map,
443 unsigned long pnum_begin, 444 unsigned long pnum_begin,
444 unsigned long pnum_end, 445 unsigned long pnum_end,
@@ -447,8 +448,7 @@ static void __init sparse_early_mem_maps_alloc_node(struct page **map_map,
447 sparse_mem_maps_populate_node(map_map, pnum_begin, pnum_end, 448 sparse_mem_maps_populate_node(map_map, pnum_begin, pnum_end,
448 map_count, nodeid); 449 map_count, nodeid);
449} 450}
450 451#else
451#ifndef CONFIG_SPARSEMEM_ALLOC_MEM_MAP_TOGETHER
452static struct page __init *sparse_early_mem_map_alloc(unsigned long pnum) 452static struct page __init *sparse_early_mem_map_alloc(unsigned long pnum)
453{ 453{
454 struct page *map; 454 struct page *map;
@@ -478,14 +478,17 @@ void __init sparse_init(void)
478{ 478{
479 unsigned long pnum; 479 unsigned long pnum;
480 struct page *map; 480 struct page *map;
481 struct page **map_map;
482 unsigned long *usemap; 481 unsigned long *usemap;
483 unsigned long **usemap_map; 482 unsigned long **usemap_map;
484 int size, size2; 483 int size;
485 int nodeid_begin = 0; 484 int nodeid_begin = 0;
486 unsigned long pnum_begin = 0; 485 unsigned long pnum_begin = 0;
487 unsigned long usemap_count; 486 unsigned long usemap_count;
487#ifdef CONFIG_SPARSEMEM_ALLOC_MEM_MAP_TOGETHER
488 unsigned long map_count; 488 unsigned long map_count;
489 int size2;
490 struct page **map_map;
491#endif
489 492
490 /* 493 /*
491 * map is using big page (aka 2M in x86 64 bit) 494 * map is using big page (aka 2M in x86 64 bit)