diff options
| -rw-r--r-- | arch/x86/mm/numa_emulation.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/arch/x86/mm/numa_emulation.c b/arch/x86/mm/numa_emulation.c index b54d52a2d00a..d71d72cf6c66 100644 --- a/arch/x86/mm/numa_emulation.c +++ b/arch/x86/mm/numa_emulation.c | |||
| @@ -400,9 +400,17 @@ void __init numa_emulation(struct numa_meminfo *numa_meminfo, int numa_dist_cnt) | |||
| 400 | n = simple_strtoul(emu_cmdline, &emu_cmdline, 0); | 400 | n = simple_strtoul(emu_cmdline, &emu_cmdline, 0); |
| 401 | ret = -1; | 401 | ret = -1; |
| 402 | for_each_node_mask(i, physnode_mask) { | 402 | for_each_node_mask(i, physnode_mask) { |
| 403 | /* | ||
| 404 | * The reason we pass in blk[0] is due to | ||
| 405 | * numa_remove_memblk_from() called by | ||
| 406 | * emu_setup_memblk() will delete entry 0 | ||
| 407 | * and then move everything else up in the pi.blk | ||
| 408 | * array. Therefore we should always be looking | ||
| 409 | * at blk[0]. | ||
| 410 | */ | ||
| 403 | ret = split_nodes_size_interleave_uniform(&ei, &pi, | 411 | ret = split_nodes_size_interleave_uniform(&ei, &pi, |
| 404 | pi.blk[i].start, pi.blk[i].end, 0, | 412 | pi.blk[0].start, pi.blk[0].end, 0, |
| 405 | n, &pi.blk[i], nid); | 413 | n, &pi.blk[0], nid); |
| 406 | if (ret < 0) | 414 | if (ret < 0) |
| 407 | break; | 415 | break; |
| 408 | if (ret < n) { | 416 | if (ret < n) { |
