memblock_x86_hole_size(end, physnodes[i].end) < size)
end = physnodes[i].end;
- /*
- * Avoid allocating more nodes than requested, which can
- * happen as a result of rounding down each node's size
- * to FAKE_NODE_MIN_SIZE.
- */
- if (nodes_weight(physnode_mask) + nid >= nr_nodes)
- end = physnodes[i].end;
-
- ret = emu_setup_memblk(ei, nid++, i,
+ ret = emu_setup_memblk(ei, nid++ % nr_nodes, i,
physnodes[i].start,
min(end, physnodes[i].end));
if (ret < 0)
memblock_x86_hole_size(end, physnodes[i].end) < size)
end = physnodes[i].end;
- ret = emu_setup_memblk(ei, nid++, i,
+ ret = emu_setup_memblk(ei, nid++ % MAX_NUMNODES, i,
physnodes[i].start,
min(end, physnodes[i].end));
if (ret < 0)