diff options
author | Yinghai Lu <yhlu.kernel@gmail.com> | 2008-03-18 15:52:37 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-04-26 16:51:08 -0400 |
commit | 1a27fc0a42162964d758e9d36d2d1b49c082a67c (patch) | |
tree | b94c4864edd0869d8ab7b25b9c3942a14bb6f9db /arch/x86/kernel/setup_64.c | |
parent | 8b3cd09ed23049fcb02479c6286744b36324ac9d (diff) |
x86_64: fix setup_node_bootmem to support big mem excluding with memmap
typical case: four sockets system, every node has 4g ram, and we are using:
memmap=10g$4g
to mask out memory on node1 and node2
when numa is enabled, early_node_mem is used to get node_data and node_bootmap.
if it can not get memory from the same node with find_e820_area(), it will
use alloc_bootmem to get buff from previous nodes.
so check it and print out some info about it.
need to move early_res_to_bootmem into every setup_node_bootmem.
and it takes range that node has. otherwise alloc_bootmem could return addr
that reserved early.
depends on "mm: make reserve_bootmem can crossed the nodes".
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/setup_64.c')
-rw-r--r-- | arch/x86/kernel/setup_64.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/x86/kernel/setup_64.c b/arch/x86/kernel/setup_64.c index b04e2c011e1a..60e64c8eee92 100644 --- a/arch/x86/kernel/setup_64.c +++ b/arch/x86/kernel/setup_64.c | |||
@@ -190,6 +190,7 @@ contig_initmem_init(unsigned long start_pfn, unsigned long end_pfn) | |||
190 | bootmap_size = init_bootmem(bootmap >> PAGE_SHIFT, end_pfn); | 190 | bootmap_size = init_bootmem(bootmap >> PAGE_SHIFT, end_pfn); |
191 | e820_register_active_regions(0, start_pfn, end_pfn); | 191 | e820_register_active_regions(0, start_pfn, end_pfn); |
192 | free_bootmem_with_active_regions(0, end_pfn); | 192 | free_bootmem_with_active_regions(0, end_pfn); |
193 | early_res_to_bootmem(0, end_pfn<<PAGE_SHIFT); | ||
193 | reserve_bootmem(bootmap, bootmap_size, BOOTMEM_DEFAULT); | 194 | reserve_bootmem(bootmap, bootmap_size, BOOTMEM_DEFAULT); |
194 | } | 195 | } |
195 | #endif | 196 | #endif |
@@ -421,8 +422,6 @@ void __init setup_arch(char **cmdline_p) | |||
421 | contig_initmem_init(0, end_pfn); | 422 | contig_initmem_init(0, end_pfn); |
422 | #endif | 423 | #endif |
423 | 424 | ||
424 | early_res_to_bootmem(); | ||
425 | |||
426 | dma32_reserve_bootmem(); | 425 | dma32_reserve_bootmem(); |
427 | 426 | ||
428 | #ifdef CONFIG_ACPI_SLEEP | 427 | #ifdef CONFIG_ACPI_SLEEP |