aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/setup.c
diff options
context:
space:
mode:
authorYinghai Lu <yinghai@kernel.org>2010-08-25 16:39:18 -0400
committerH. Peter Anvin <hpa@zytor.com>2010-08-27 14:13:54 -0400
commit6f2a75369e7561e800d86927ecd83c970996b21f (patch)
tree558e90d291a6dfc17cd950805bf5f56cb2b690e1 /arch/x86/kernel/setup.c
parenta587d2daebcd2bc159d4348b6a7b028950a6d803 (diff)
x86, memblock: Use memblock_memory_size()/memblock_free_memory_size() to get correct dma_reserve
memblock_memory_size() will return memory size in memblock.memory.region. memblock_free_memory_size() will return free memory size in memblock.memory.region. So We can get exact reseved size in specified range. Set the size right after initmem_init(), because later bootmem API will get area above 16M. (except some fallback). Later after we remove the bootmem, We could call that just before paging_init(). Signed-off-by: Yinghai Lu <yinghai@kernel.org> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'arch/x86/kernel/setup.c')
-rw-r--r--arch/x86/kernel/setup.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index a4f01733e879..924c8f78e98e 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -1013,6 +1013,7 @@ void __init setup_arch(char **cmdline_p)
1013#endif 1013#endif
1014 1014
1015 initmem_init(0, max_pfn, acpi, k8); 1015 initmem_init(0, max_pfn, acpi, k8);
1016 memblock_find_dma_reserve();
1016#ifndef CONFIG_NO_BOOTMEM 1017#ifndef CONFIG_NO_BOOTMEM
1017 memblock_x86_to_bootmem(0, max_low_pfn<<PAGE_SHIFT); 1018 memblock_x86_to_bootmem(0, max_low_pfn<<PAGE_SHIFT);
1018#endif 1019#endif