aboutsummaryrefslogtreecommitdiffstats
path: root/mm/nobootmem.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2011-07-12 05:16:06 -0400
committerH. Peter Anvin <hpa@linux.intel.com>2011-07-14 14:47:53 -0400
commit24aa07882b672fff2da2f5c955759f0bd13d32d5 (patch)
treee6dad38048ede1dbb9ad3c7fffcc4b37e72274a8 /mm/nobootmem.c
parentc378ddd53f9b8832a46fd4fec050a97fc2269858 (diff)
memblock, x86: Replace memblock_x86_reserve/free_range() with generic ones
Other than sanity check and debug message, the x86 specific version of memblock reserve/free functions are simple wrappers around the generic versions - memblock_reserve/free(). This patch adds debug messages with caller identification to the generic versions and replaces x86 specific ones and kills them. arch/x86/include/asm/memblock.h and arch/x86/mm/memblock.c are empty after this change and removed. Signed-off-by: Tejun Heo <tj@kernel.org> Link: http://lkml.kernel.org/r/1310462166-31469-14-git-send-email-tj@kernel.org Cc: Yinghai Lu <yinghai@kernel.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@redhat.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'mm/nobootmem.c')
-rw-r--r--mm/nobootmem.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/mm/nobootmem.c b/mm/nobootmem.c
index 7075bc00fa84..29d948ce6d0f 100644
--- a/mm/nobootmem.c
+++ b/mm/nobootmem.c
@@ -47,7 +47,7 @@ static void * __init __alloc_memory_core_early(int nid, u64 size, u64 align,
47 47
48 ptr = phys_to_virt(addr); 48 ptr = phys_to_virt(addr);
49 memset(ptr, 0, size); 49 memset(ptr, 0, size);
50 memblock_x86_reserve_range(addr, addr + size, "BOOTMEM"); 50 memblock_reserve(addr, size);
51 /* 51 /*
52 * The min_count is set to 0 so that bootmem allocated blocks 52 * The min_count is set to 0 so that bootmem allocated blocks
53 * are never reported as leaks. 53 * are never reported as leaks.
@@ -175,7 +175,7 @@ void __init free_bootmem_node(pg_data_t *pgdat, unsigned long physaddr,
175 unsigned long size) 175 unsigned long size)
176{ 176{
177 kmemleak_free_part(__va(physaddr), size); 177 kmemleak_free_part(__va(physaddr), size);
178 memblock_x86_free_range(physaddr, physaddr + size); 178 memblock_free(physaddr, size);
179} 179}
180 180
181/** 181/**
@@ -190,7 +190,7 @@ void __init free_bootmem_node(pg_data_t *pgdat, unsigned long physaddr,
190void __init free_bootmem(unsigned long addr, unsigned long size) 190void __init free_bootmem(unsigned long addr, unsigned long size)
191{ 191{
192 kmemleak_free_part(__va(addr), size); 192 kmemleak_free_part(__va(addr), size);
193 memblock_x86_free_range(addr, addr + size); 193 memblock_free(addr, size);
194} 194}
195 195
196static void * __init ___alloc_bootmem_nopanic(unsigned long size, 196static void * __init ___alloc_bootmem_nopanic(unsigned long size,