diff --git a/include/linux/bootmem.h b/include/linux/bootmem.h index 42515195d7d8ba8ce14913a16cfb9075db656866..043320e48fe218662f002a4838ae3036c14b33d8 100644 --- a/include/linux/bootmem.h +++ b/include/linux/bootmem.h @@ -9,6 +9,7 @@ #include #include #include +#include /* * simple boot-time physical memory area allocator. @@ -251,13 +252,13 @@ static inline void * __init memblock_virt_alloc_node_nopanic( static inline void __init memblock_free_early( phys_addr_t base, phys_addr_t size) { - __memblock_free_early(base, size); + memblock_free(base, size); } static inline void __init memblock_free_early_nid( phys_addr_t base, phys_addr_t size, int nid) { - __memblock_free_early(base, size); + memblock_free(base, size); } static inline void __init memblock_free_late( diff --git a/include/linux/memblock.h b/include/linux/memblock.h index 5785b86a72f4597476c1863803e249d456b56d14..f2bf6eaaea0196278cd59ba4e6a75b0f398e8c42 100644 --- a/include/linux/memblock.h +++ b/include/linux/memblock.h @@ -138,7 +138,6 @@ void __next_mem_range_rev(u64 *idx, int nid, enum memblock_flags flags, void __next_reserved_mem_region(u64 *idx, phys_addr_t *out_start, phys_addr_t *out_end); -void __memblock_free_early(phys_addr_t base, phys_addr_t size); void __memblock_free_late(phys_addr_t base, phys_addr_t size); /** diff --git a/mm/memblock.c b/mm/memblock.c index 8af95749cbf08fd15bf24fb4b1e191bae43c66fa..519a5cb11eed1741d19c8d213d389055536cee49 100644 --- a/mm/memblock.c +++ b/mm/memblock.c @@ -792,7 +792,14 @@ int __init_memblock memblock_remove(phys_addr_t base, phys_addr_t size) return memblock_remove_range(&memblock.memory, base, size); } - +/** + * memblock_free - free boot memory block + * @base: phys starting address of the boot memory block + * @size: size of the boot memory block in bytes + * + * Free boot memory block previously allocated by memblock_alloc_xx() API. + * The freeing memory will not be released to the buddy allocator. + */ int __init_memblock memblock_free(phys_addr_t base, phys_addr_t size) { phys_addr_t end = base + size - 1; @@ -1585,19 +1592,6 @@ void * __init memblock_virt_alloc_try_nid( } #endif -/** - * __memblock_free_early - free boot memory block - * @base: phys starting address of the boot memory block - * @size: size of the boot memory block in bytes - * - * Free boot memory block previously allocated by memblock_virt_alloc_xx() API. - * The freeing memory will not be released to the buddy allocator. - */ -void __init __memblock_free_early(phys_addr_t base, phys_addr_t size) -{ - memblock_free(base, size); -} - /** * __memblock_free_late - free bootmem block pages directly to buddy allocator * @base: phys starting address of the boot memory block