Commit b525cd44 authored by Dave Hansen's avatar Dave Hansen Committed by Linus Torvalds

[PATCH] x86: remove-free_all_bootmem() #define

in arch/i386/mm/init.c, there's a #define for __free_all_bootmem():

#ifndef CONFIG_DISCONTIGMEM
#define __free_all_bootmem() free_all_bootmem()
#else
#define __free_all_bootmem() free_all_bootmem_node(NODE_DATA(0))
#endif /* !CONFIG_DISCONTIGMEM */

However, both of those functions end up eventually calling the same
thing:

	free_all_bootmem_core(NODE_DATA(0))

This might have once been a placeholder for a more complex bootmem
init call, but that never happened.  So, kill off the DISCONTIG
version, and just call free_all_bootmem() directly in both cases.
Signed-off-by: default avatarDave Hansen <haveblue@us.ibm.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 70b833b5
...@@ -560,12 +560,6 @@ static void __init set_max_mapnr_init(void) ...@@ -560,12 +560,6 @@ static void __init set_max_mapnr_init(void)
#endif #endif
} }
#ifndef CONFIG_DISCONTIGMEM
#define __free_all_bootmem() free_all_bootmem()
#else
#define __free_all_bootmem() free_all_bootmem_node(NODE_DATA(0))
#endif /* !CONFIG_DISCONTIGMEM */
static struct kcore_list kcore_mem, kcore_vmalloc; static struct kcore_list kcore_mem, kcore_vmalloc;
void __init mem_init(void) void __init mem_init(void)
...@@ -601,7 +595,7 @@ void __init mem_init(void) ...@@ -601,7 +595,7 @@ void __init mem_init(void)
#endif #endif
/* this will put all low memory onto the freelists */ /* this will put all low memory onto the freelists */
totalram_pages += __free_all_bootmem(); totalram_pages += free_all_bootmem();
reservedpages = 0; reservedpages = 0;
for (tmp = 0; tmp < max_low_pfn; tmp++) for (tmp = 0; tmp < max_low_pfn; tmp++)
......
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