diff options
author | Yinghai Lu <yinghai@kernel.org> | 2010-02-10 04:20:15 -0500 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2010-02-10 20:47:18 -0500 |
commit | 1842f90cc98625d4d9bf8f8b927f17705ceb4e9c (patch) | |
tree | 12a120d130aef8d12010d1b3732af1387bac751d /arch/x86/mm/init_64.c | |
parent | 79c601695870ca2a9c0ba9949a97d2be78ec07b2 (diff) |
x86: Call early_res_to_bootmem one time
Simplify setup_node_mem: don't use bootmem from other node, instead
just find_e820_area in early_node_mem.
This keeps the boundary between early_res and boot mem more clear, and
lets us only call early_res_to_bootmem() one time instead of for all
nodes.
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
LKML-Reference: <1265793639-15071-12-git-send-email-yinghai@kernel.org>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'arch/x86/mm/init_64.c')
-rw-r--r-- | arch/x86/mm/init_64.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c index 69ddfbd91135..a15abaae5ba4 100644 --- a/arch/x86/mm/init_64.c +++ b/arch/x86/mm/init_64.c | |||
@@ -579,13 +579,12 @@ void __init initmem_init(unsigned long start_pfn, unsigned long end_pfn, | |||
579 | PAGE_SIZE); | 579 | PAGE_SIZE); |
580 | if (bootmap == -1L) | 580 | if (bootmap == -1L) |
581 | panic("Cannot find bootmem map of size %ld\n", bootmap_size); | 581 | panic("Cannot find bootmem map of size %ld\n", bootmap_size); |
582 | reserve_early(bootmap, bootmap + bootmap_size, "BOOTMAP"); | ||
582 | /* don't touch min_low_pfn */ | 583 | /* don't touch min_low_pfn */ |
583 | bootmap_size = init_bootmem_node(NODE_DATA(0), bootmap >> PAGE_SHIFT, | 584 | bootmap_size = init_bootmem_node(NODE_DATA(0), bootmap >> PAGE_SHIFT, |
584 | 0, end_pfn); | 585 | 0, end_pfn); |
585 | e820_register_active_regions(0, start_pfn, end_pfn); | 586 | e820_register_active_regions(0, start_pfn, end_pfn); |
586 | free_bootmem_with_active_regions(0, end_pfn); | 587 | free_bootmem_with_active_regions(0, end_pfn); |
587 | early_res_to_bootmem(0, end_pfn<<PAGE_SHIFT); | ||
588 | reserve_bootmem(bootmap, bootmap_size, BOOTMEM_DEFAULT); | ||
589 | } | 588 | } |
590 | #endif | 589 | #endif |
591 | 590 | ||