aboutsummaryrefslogtreecommitdiffstats
path: root/mm/sparse.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/sparse.c')
-rw-r--r--mm/sparse.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/mm/sparse.c b/mm/sparse.c
index 7b4be3fd5cac..83b3bf6461af 100644
--- a/mm/sparse.c
+++ b/mm/sparse.c
@@ -65,14 +65,10 @@ static noinline struct mem_section __ref *sparse_index_alloc(int nid)
65 unsigned long array_size = SECTIONS_PER_ROOT * 65 unsigned long array_size = SECTIONS_PER_ROOT *
66 sizeof(struct mem_section); 66 sizeof(struct mem_section);
67 67
68 if (slab_is_available()) { 68 if (slab_is_available())
69 if (node_state(nid, N_HIGH_MEMORY)) 69 section = kzalloc_node(array_size, GFP_KERNEL, nid);
70 section = kzalloc_node(array_size, GFP_KERNEL, nid); 70 else
71 else
72 section = kzalloc(array_size, GFP_KERNEL);
73 } else {
74 section = memblock_virt_alloc_node(array_size, nid); 71 section = memblock_virt_alloc_node(array_size, nid);
75 }
76 72
77 return section; 73 return section;
78} 74}
@@ -630,7 +626,7 @@ void online_mem_sections(unsigned long start_pfn, unsigned long end_pfn)
630 unsigned long pfn; 626 unsigned long pfn;
631 627
632 for (pfn = start_pfn; pfn < end_pfn; pfn += PAGES_PER_SECTION) { 628 for (pfn = start_pfn; pfn < end_pfn; pfn += PAGES_PER_SECTION) {
633 unsigned long section_nr = pfn_to_section_nr(start_pfn); 629 unsigned long section_nr = pfn_to_section_nr(pfn);
634 struct mem_section *ms; 630 struct mem_section *ms;
635 631
636 /* onlining code should never touch invalid ranges */ 632 /* onlining code should never touch invalid ranges */