|
@@ -65,14 +65,10 @@ static noinline struct mem_section __ref *sparse_index_alloc(int nid)
|
|
|
unsigned long array_size = SECTIONS_PER_ROOT *
|
|
|
sizeof(struct mem_section);
|
|
|
|
|
|
- if (slab_is_available()) {
|
|
|
- if (node_state(nid, N_HIGH_MEMORY))
|
|
|
- section = kzalloc_node(array_size, GFP_KERNEL, nid);
|
|
|
- else
|
|
|
- section = kzalloc(array_size, GFP_KERNEL);
|
|
|
- } else {
|
|
|
+ if (slab_is_available())
|
|
|
+ section = kzalloc_node(array_size, GFP_KERNEL, nid);
|
|
|
+ else
|
|
|
section = memblock_virt_alloc_node(array_size, nid);
|
|
|
- }
|
|
|
|
|
|
return section;
|
|
|
}
|