aboutsummaryrefslogtreecommitdiffstats
path: root/mm/sparse.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2017-10-20 07:06:52 -0400
committerIngo Molnar <mingo@kernel.org>2017-10-20 07:06:52 -0400
commit967535223f9a8d95c187a8728480b569164cd4f4 (patch)
treeb68a403701555a747b25c903d8136d86a1a1c133 /mm/sparse.c
parent5b65c4677a57a1d4414212f9995aa0e46a21ff80 (diff)
parentce56a86e2ade45d052b3228cdfebe913a1ae7381 (diff)
Merge branch 'x86/urgent' into x86/mm, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
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 */