Commit 94b43c3d authored by Yinghai Lu's avatar Yinghai Lu Committed by H. Peter Anvin

x86, mm: kill numa_free_all_bootmem()

Now NO_BOOTMEM version free_all_bootmem_node() does not really
do free_bootmem at all, and it only call register_page_bootmem_info_node
instead.

That is confusing, try to kill that free_all_bootmem_node().

Before that, this patch will remove numa_free_all_bootmem().

That function could be replaced with register_page_bootmem_info() and
free_all_bootmem();
Signed-off-by: default avatarYinghai Lu <yinghai@kernel.org>
Link: http://lkml.kernel.org/r/1353123563-3103-43-git-send-email-yinghai@kernel.orgSigned-off-by: default avatarH. Peter Anvin <hpa@linux.intel.com>
parent b8fd39c0
#ifndef _ASM_X86_NUMA_64_H #ifndef _ASM_X86_NUMA_64_H
#define _ASM_X86_NUMA_64_H #define _ASM_X86_NUMA_64_H
extern unsigned long numa_free_all_bootmem(void);
#endif /* _ASM_X86_NUMA_64_H */ #endif /* _ASM_X86_NUMA_64_H */
...@@ -629,6 +629,16 @@ EXPORT_SYMBOL_GPL(arch_add_memory); ...@@ -629,6 +629,16 @@ EXPORT_SYMBOL_GPL(arch_add_memory);
static struct kcore_list kcore_vsyscall; static struct kcore_list kcore_vsyscall;
static void __init register_page_bootmem_info(void)
{
#ifdef CONFIG_NUMA
int i;
for_each_online_node(i)
register_page_bootmem_info_node(NODE_DATA(i));
#endif
}
void __init mem_init(void) void __init mem_init(void)
{ {
long codesize, reservedpages, datasize, initsize; long codesize, reservedpages, datasize, initsize;
...@@ -641,11 +651,8 @@ void __init mem_init(void) ...@@ -641,11 +651,8 @@ void __init mem_init(void)
reservedpages = 0; reservedpages = 0;
/* this will put all low memory onto the freelists */ /* this will put all low memory onto the freelists */
#ifdef CONFIG_NUMA register_page_bootmem_info();
totalram_pages = numa_free_all_bootmem();
#else
totalram_pages = free_all_bootmem(); totalram_pages = free_all_bootmem();
#endif
absent_pages = absent_pages_in_range(0, max_pfn); absent_pages = absent_pages_in_range(0, max_pfn);
reservedpages = max_pfn - totalram_pages - absent_pages; reservedpages = max_pfn - totalram_pages - absent_pages;
......
...@@ -10,16 +10,3 @@ void __init initmem_init(void) ...@@ -10,16 +10,3 @@ void __init initmem_init(void)
{ {
x86_numa_init(); x86_numa_init();
} }
unsigned long __init numa_free_all_bootmem(void)
{
unsigned long pages = 0;
int i;
for_each_online_node(i)
pages += free_all_bootmem_node(NODE_DATA(i));
pages += free_low_memory_core_early(MAX_NUMNODES);
return pages;
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment