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>
This commit is contained in:
parent
c378ddd53f
commit
24aa07882b
22 changed files with 48 additions and 97 deletions
|
@ -364,8 +364,7 @@ void __init numa_reset_distance(void)
|
|||
|
||||
/* numa_distance could be 1LU marking allocation failure, test cnt */
|
||||
if (numa_distance_cnt)
|
||||
memblock_x86_free_range(__pa(numa_distance),
|
||||
__pa(numa_distance) + size);
|
||||
memblock_free(__pa(numa_distance), size);
|
||||
numa_distance_cnt = 0;
|
||||
numa_distance = NULL; /* enable table creation */
|
||||
}
|
||||
|
@ -394,7 +393,7 @@ static int __init numa_alloc_distance(void)
|
|||
numa_distance = (void *)1LU;
|
||||
return -ENOMEM;
|
||||
}
|
||||
memblock_x86_reserve_range(phys, phys + size, "NUMA DIST");
|
||||
memblock_reserve(phys, size);
|
||||
|
||||
numa_distance = __va(phys);
|
||||
numa_distance_cnt = cnt;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue