diff options
Diffstat (limited to 'arch/x86_64/mm/numa.c')
-rw-r--r-- | arch/x86_64/mm/numa.c | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/arch/x86_64/mm/numa.c b/arch/x86_64/mm/numa.c index c55936bc6be6..0ae2d9d5d7ea 100644 --- a/arch/x86_64/mm/numa.c +++ b/arch/x86_64/mm/numa.c | |||
@@ -418,11 +418,25 @@ static int __init numa_emulation(unsigned long start_pfn, unsigned long end_pfn) | |||
418 | done: | 418 | done: |
419 | if (!num_nodes) | 419 | if (!num_nodes) |
420 | return -1; | 420 | return -1; |
421 | /* Fill remainder of system RAM with a final node, if appropriate. */ | 421 | /* Fill remainder of system RAM, if appropriate. */ |
422 | if (addr < max_addr) { | 422 | if (addr < max_addr) { |
423 | setup_node_range(num_nodes, nodes, &addr, max_addr - addr, | 423 | switch (*(cmdline - 1)) { |
424 | max_addr); | 424 | case '*': |
425 | num_nodes++; | 425 | /* Split remaining nodes into coeff chunks */ |
426 | if (coeff <= 0) | ||
427 | break; | ||
428 | num_nodes += split_nodes_equally(nodes, &addr, max_addr, | ||
429 | num_nodes, coeff); | ||
430 | break; | ||
431 | case ',': | ||
432 | /* Do not allocate remaining system RAM */ | ||
433 | break; | ||
434 | default: | ||
435 | /* Give one final node */ | ||
436 | setup_node_range(num_nodes, nodes, &addr, | ||
437 | max_addr - addr, max_addr); | ||
438 | num_nodes++; | ||
439 | } | ||
426 | } | 440 | } |
427 | out: | 441 | out: |
428 | memnode_shift = compute_hash_shift(nodes, num_nodes); | 442 | memnode_shift = compute_hash_shift(nodes, num_nodes); |