Commit c6ffc5ca authored by Mike Rapoport's avatar Mike Rapoport Committed by Linus Torvalds

memblock: rename free_all_bootmem to memblock_free_all

The conversion is done using

sed -i 's@free_all_bootmem@memblock_free_all@' \
    $(git grep -l free_all_bootmem)

Link: http://lkml.kernel.org/r/1536927045-23536-26-git-send-email-rppt@linux.vnet.ibm.comSigned-off-by: default avatarMike Rapoport <rppt@linux.vnet.ibm.com>
Acked-by: default avatarMichal Hocko <mhocko@suse.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Chris Zankel <chris@zankel.net>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Greentime Hu <green.hu@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Guan Xuetao <gxt@pku.edu.cn>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
Cc: Jonas Bonn <jonas@southpole.se>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Ley Foon Tan <lftan@altera.com>
Cc: Mark Salter <msalter@redhat.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Matt Turner <mattst88@gmail.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Palmer Dabbelt <palmer@sifive.com>
Cc: Paul Burton <paul.burton@mips.com>
Cc: Richard Kuo <rkuo@codeaurora.org>
Cc: Richard Weinberger <richard@nod.at>
Cc: Rich Felker <dalias@libc.org>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Serge Semin <fancer.lancer@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 53ab85eb
...@@ -282,7 +282,7 @@ mem_init(void) ...@@ -282,7 +282,7 @@ mem_init(void)
{ {
set_max_mapnr(max_low_pfn); set_max_mapnr(max_low_pfn);
high_memory = (void *) __va(max_low_pfn * PAGE_SIZE); high_memory = (void *) __va(max_low_pfn * PAGE_SIZE);
free_all_bootmem(); memblock_free_all();
mem_init_print_info(NULL); mem_init_print_info(NULL);
} }
......
...@@ -218,7 +218,7 @@ void __init mem_init(void) ...@@ -218,7 +218,7 @@ void __init mem_init(void)
free_highmem_page(pfn_to_page(tmp)); free_highmem_page(pfn_to_page(tmp));
#endif #endif
free_all_bootmem(); memblock_free_all();
mem_init_print_info(NULL); mem_init_print_info(NULL);
} }
......
...@@ -508,7 +508,7 @@ void __init mem_init(void) ...@@ -508,7 +508,7 @@ void __init mem_init(void)
/* this will put all unused low memory onto the freelists */ /* this will put all unused low memory onto the freelists */
free_unused_memmap(); free_unused_memmap();
free_all_bootmem(); memblock_free_all();
#ifdef CONFIG_SA1111 #ifdef CONFIG_SA1111
/* now that our DMA memory is actually so designated, we can free it */ /* now that our DMA memory is actually so designated, we can free it */
......
...@@ -599,7 +599,7 @@ void __init mem_init(void) ...@@ -599,7 +599,7 @@ void __init mem_init(void)
free_unused_memmap(); free_unused_memmap();
#endif #endif
/* this will put all unused low memory onto the freelists */ /* this will put all unused low memory onto the freelists */
free_all_bootmem(); memblock_free_all();
kexec_reserve_crashkres_pages(); kexec_reserve_crashkres_pages();
......
...@@ -62,7 +62,7 @@ void __init mem_init(void) ...@@ -62,7 +62,7 @@ void __init mem_init(void)
high_memory = (void *)(memory_end & PAGE_MASK); high_memory = (void *)(memory_end & PAGE_MASK);
/* this will put all memory onto the freelists */ /* this will put all memory onto the freelists */
free_all_bootmem(); memblock_free_all();
mem_init_print_info(NULL); mem_init_print_info(NULL);
} }
......
...@@ -96,7 +96,7 @@ void __init mem_init(void) ...@@ -96,7 +96,7 @@ void __init mem_init(void)
max_mapnr = MAP_NR(high_memory); max_mapnr = MAP_NR(high_memory);
/* this will put all low memory onto the freelists */ /* this will put all low memory onto the freelists */
free_all_bootmem(); memblock_free_all();
mem_init_print_info(NULL); mem_init_print_info(NULL);
} }
......
...@@ -68,7 +68,7 @@ unsigned long long kmap_generation; ...@@ -68,7 +68,7 @@ unsigned long long kmap_generation;
void __init mem_init(void) void __init mem_init(void)
{ {
/* No idea where this is actually declared. Seems to evade LXR. */ /* No idea where this is actually declared. Seems to evade LXR. */
free_all_bootmem(); memblock_free_all();
mem_init_print_info(NULL); mem_init_print_info(NULL);
/* /*
......
...@@ -627,7 +627,7 @@ mem_init (void) ...@@ -627,7 +627,7 @@ mem_init (void)
set_max_mapnr(max_low_pfn); set_max_mapnr(max_low_pfn);
high_memory = __va(max_low_pfn * PAGE_SIZE); high_memory = __va(max_low_pfn * PAGE_SIZE);
free_all_bootmem(); memblock_free_all();
mem_init_print_info(NULL); mem_init_print_info(NULL);
/* /*
......
...@@ -140,7 +140,7 @@ static inline void init_pointer_tables(void) ...@@ -140,7 +140,7 @@ static inline void init_pointer_tables(void)
void __init mem_init(void) void __init mem_init(void)
{ {
/* this will put all memory onto the freelists */ /* this will put all memory onto the freelists */
free_all_bootmem(); memblock_free_all();
init_pointer_tables(); init_pointer_tables();
mem_init_print_info(NULL); mem_init_print_info(NULL);
} }
......
...@@ -204,7 +204,7 @@ void __init mem_init(void) ...@@ -204,7 +204,7 @@ void __init mem_init(void)
high_memory = (void *)__va(memory_start + lowmem_size - 1); high_memory = (void *)__va(memory_start + lowmem_size - 1);
/* this will put all memory onto the freelists */ /* this will put all memory onto the freelists */
free_all_bootmem(); memblock_free_all();
#ifdef CONFIG_HIGHMEM #ifdef CONFIG_HIGHMEM
highmem_setup(); highmem_setup();
#endif #endif
......
...@@ -272,7 +272,7 @@ void __init paging_init(void) ...@@ -272,7 +272,7 @@ void __init paging_init(void)
void __init mem_init(void) void __init mem_init(void)
{ {
high_memory = (void *) __va(get_num_physpages() << PAGE_SHIFT); high_memory = (void *) __va(get_num_physpages() << PAGE_SHIFT);
free_all_bootmem(); memblock_free_all();
setup_zero_pages(); /* This comes from node 0 */ setup_zero_pages(); /* This comes from node 0 */
mem_init_print_info(NULL); mem_init_print_info(NULL);
} }
......
...@@ -463,7 +463,7 @@ void __init mem_init(void) ...@@ -463,7 +463,7 @@ void __init mem_init(void)
high_memory = (void *) __va(max_low_pfn << PAGE_SHIFT); high_memory = (void *) __va(max_low_pfn << PAGE_SHIFT);
maar_init(); maar_init();
free_all_bootmem(); memblock_free_all();
setup_zero_pages(); /* Setup zeroed pages. */ setup_zero_pages(); /* Setup zeroed pages. */
mem_init_free_highmem(); mem_init_free_highmem();
mem_init_print_info(NULL); mem_init_print_info(NULL);
......
...@@ -475,7 +475,7 @@ void __init paging_init(void) ...@@ -475,7 +475,7 @@ void __init paging_init(void)
void __init mem_init(void) void __init mem_init(void)
{ {
high_memory = (void *) __va(get_num_physpages() << PAGE_SHIFT); high_memory = (void *) __va(get_num_physpages() << PAGE_SHIFT);
free_all_bootmem(); memblock_free_all();
setup_zero_pages(); /* This comes from node 0 */ setup_zero_pages(); /* This comes from node 0 */
mem_init_print_info(NULL); mem_init_print_info(NULL);
} }
...@@ -192,7 +192,7 @@ void __init mem_init(void) ...@@ -192,7 +192,7 @@ void __init mem_init(void)
free_highmem(); free_highmem();
/* this will put all low memory onto the freelists */ /* this will put all low memory onto the freelists */
free_all_bootmem(); memblock_free_all();
mem_init_print_info(NULL); mem_init_print_info(NULL);
pr_info("virtual kernel memory layout:\n" pr_info("virtual kernel memory layout:\n"
......
...@@ -73,7 +73,7 @@ void __init mem_init(void) ...@@ -73,7 +73,7 @@ void __init mem_init(void)
high_memory = __va(end_mem); high_memory = __va(end_mem);
/* this will put all memory onto the freelists */ /* this will put all memory onto the freelists */
free_all_bootmem(); memblock_free_all();
mem_init_print_info(NULL); mem_init_print_info(NULL);
} }
......
...@@ -213,7 +213,7 @@ void __init mem_init(void) ...@@ -213,7 +213,7 @@ void __init mem_init(void)
memset((void *)empty_zero_page, 0, PAGE_SIZE); memset((void *)empty_zero_page, 0, PAGE_SIZE);
/* this will put all low memory onto the freelists */ /* this will put all low memory onto the freelists */
free_all_bootmem(); memblock_free_all();
mem_init_print_info(NULL); mem_init_print_info(NULL);
......
...@@ -621,7 +621,7 @@ void __init mem_init(void) ...@@ -621,7 +621,7 @@ void __init mem_init(void)
high_memory = __va((max_pfn << PAGE_SHIFT)); high_memory = __va((max_pfn << PAGE_SHIFT));
set_max_mapnr(page_to_pfn(virt_to_page(high_memory - 1)) + 1); set_max_mapnr(page_to_pfn(virt_to_page(high_memory - 1)) + 1);
free_all_bootmem(); memblock_free_all();
#ifdef CONFIG_PA11 #ifdef CONFIG_PA11
if (boot_cpu_data.cpu_type == pcxl2 || boot_cpu_data.cpu_type == pcxl) { if (boot_cpu_data.cpu_type == pcxl2 || boot_cpu_data.cpu_type == pcxl) {
......
...@@ -349,7 +349,7 @@ void __init mem_init(void) ...@@ -349,7 +349,7 @@ void __init mem_init(void)
high_memory = (void *) __va(max_low_pfn * PAGE_SIZE); high_memory = (void *) __va(max_low_pfn * PAGE_SIZE);
set_max_mapnr(max_pfn); set_max_mapnr(max_pfn);
free_all_bootmem(); memblock_free_all();
#ifdef CONFIG_HIGHMEM #ifdef CONFIG_HIGHMEM
{ {
......
...@@ -55,7 +55,7 @@ void __init mem_init(void) ...@@ -55,7 +55,7 @@ void __init mem_init(void)
#endif /* CONFIG_FLATMEM */ #endif /* CONFIG_FLATMEM */
high_memory = (void *)(__va(PFN_PHYS(max_low_pfn))); high_memory = (void *)(__va(PFN_PHYS(max_low_pfn)));
free_all_bootmem(); memblock_free_all();
mem_init_print_info(NULL); mem_init_print_info(NULL);
} }
......
...@@ -139,7 +139,7 @@ void __init mem_init(void) ...@@ -139,7 +139,7 @@ void __init mem_init(void)
cmma_init(); cmma_init();
/* this will put all low memory onto the freelists */ /* this will put all low memory onto the freelists */
free_all_bootmem(); memblock_free_all();
setup_zero_pages(); /* Setup zeroed pages. */ setup_zero_pages(); /* Setup zeroed pages. */
cmma_init_nodat(); cmma_init_nodat();
......
...@@ -350,7 +350,7 @@ void __init mem_init(void) ...@@ -350,7 +350,7 @@ void __init mem_init(void)
high_memory = max_t(void *, high_memory, high_memory = max_t(void *, high_memory,
__va(pgdat_end_pfn(pgdat) << PAGE_SHIFT)); __va(pgdat_end_pfn(pgdat) << PAGE_SHIFT));
free_all_bootmem(); memblock_free_all();
/* Set this up early, so we can take care of the zero page */ /* Set this up early, so we can take care of the zero page */
cpu_cache_init(); cpu_cache_init();
......
...@@ -277,7 +277,7 @@ void __init mem_init(void) ...@@ -277,7 +277,7 @@ void __init mem_init(void)
max_mapnr = last_valid_pfn - pfn_base; max_mapnr = last_valid_pfn - pfn_base;
high_memory = __va(max_low_pfn << PAGE_SHIFT); high_memory = __va(max_low_pfn << PAGE_SHIFT);
free_all_bootmem(); memblock_free_all();
for (i = 0; sp_banks[i].num_bytes != 0; i++) { for (i = 0; sp_banks[i].num_bytes != 0; i++) {
unsigned long start_pfn = sp_banks[i].base_addr >> PAGE_SHIFT; unsigned long start_pfn = sp_banks[i].base_addr >> PAGE_SHIFT;
......
...@@ -2545,12 +2545,12 @@ void __init mem_init(void) ...@@ -2545,12 +2545,12 @@ void __init mem_init(void)
{ {
high_memory = __va(last_valid_pfn << PAGE_SHIFT); high_memory = __va(last_valid_pfn << PAGE_SHIFT);
free_all_bootmem(); memblock_free_all();
/* /*
* Must be done after boot memory is put on freelist, because here we * Must be done after boot memory is put on freelist, because here we
* might set fields in deferred struct pages that have not yet been * might set fields in deferred struct pages that have not yet been
* initialized, and free_all_bootmem() initializes all the reserved * initialized, and memblock_free_all() initializes all the reserved
* deferred pages for us. * deferred pages for us.
*/ */
register_page_bootmem_info(); register_page_bootmem_info();
......
...@@ -51,7 +51,7 @@ void __init mem_init(void) ...@@ -51,7 +51,7 @@ void __init mem_init(void)
uml_reserved = brk_end; uml_reserved = brk_end;
/* this will put all low memory onto the freelists */ /* this will put all low memory onto the freelists */
free_all_bootmem(); memblock_free_all();
max_low_pfn = totalram_pages; max_low_pfn = totalram_pages;
max_pfn = totalram_pages; max_pfn = totalram_pages;
mem_init_print_info(NULL); mem_init_print_info(NULL);
......
...@@ -286,7 +286,7 @@ void __init mem_init(void) ...@@ -286,7 +286,7 @@ void __init mem_init(void)
free_unused_memmap(&meminfo); free_unused_memmap(&meminfo);
/* this will put all unused low memory onto the freelists */ /* this will put all unused low memory onto the freelists */
free_all_bootmem(); memblock_free_all();
mem_init_print_info(NULL); mem_init_print_info(NULL);
printk(KERN_NOTICE "Virtual kernel memory layout:\n" printk(KERN_NOTICE "Virtual kernel memory layout:\n"
......
...@@ -111,7 +111,7 @@ void __init set_highmem_pages_init(void) ...@@ -111,7 +111,7 @@ void __init set_highmem_pages_init(void)
/* /*
* Explicitly reset zone->managed_pages because set_highmem_pages_init() * Explicitly reset zone->managed_pages because set_highmem_pages_init()
* is invoked before free_all_bootmem() * is invoked before memblock_free_all()
*/ */
reset_all_zones_managed_pages(); reset_all_zones_managed_pages();
for_each_zone(zone) { for_each_zone(zone) {
......
...@@ -771,7 +771,7 @@ void __init mem_init(void) ...@@ -771,7 +771,7 @@ void __init mem_init(void)
#endif #endif
/* /*
* With CONFIG_DEBUG_PAGEALLOC initialization of highmem pages has to * With CONFIG_DEBUG_PAGEALLOC initialization of highmem pages has to
* be done before free_all_bootmem(). Memblock use free low memory for * be done before memblock_free_all(). Memblock use free low memory for
* temporary data (see find_range_array()) and for this purpose can use * temporary data (see find_range_array()) and for this purpose can use
* pages that was already passed to the buddy allocator, hence marked as * pages that was already passed to the buddy allocator, hence marked as
* not accessible in the page tables when compiled with * not accessible in the page tables when compiled with
...@@ -781,7 +781,7 @@ void __init mem_init(void) ...@@ -781,7 +781,7 @@ void __init mem_init(void)
set_highmem_pages_init(); set_highmem_pages_init();
/* this will put all low memory onto the freelists */ /* this will put all low memory onto the freelists */
free_all_bootmem(); memblock_free_all();
after_bootmem = 1; after_bootmem = 1;
x86_init.hyper.init_after_bootmem(); x86_init.hyper.init_after_bootmem();
......
...@@ -1188,14 +1188,14 @@ void __init mem_init(void) ...@@ -1188,14 +1188,14 @@ void __init mem_init(void)
/* clear_bss() already clear the empty_zero_page */ /* clear_bss() already clear the empty_zero_page */
/* this will put all memory onto the freelists */ /* this will put all memory onto the freelists */
free_all_bootmem(); memblock_free_all();
after_bootmem = 1; after_bootmem = 1;
x86_init.hyper.init_after_bootmem(); x86_init.hyper.init_after_bootmem();
/* /*
* Must be done after boot memory is put on freelist, because here we * Must be done after boot memory is put on freelist, because here we
* might set fields in deferred struct pages that have not yet been * might set fields in deferred struct pages that have not yet been
* initialized, and free_all_bootmem() initializes all the reserved * initialized, and memblock_free_all() initializes all the reserved
* deferred pages for us. * deferred pages for us.
*/ */
register_page_bootmem_info(); register_page_bootmem_info();
......
...@@ -864,7 +864,7 @@ static int __init xen_mark_pinned(struct mm_struct *mm, struct page *page, ...@@ -864,7 +864,7 @@ static int __init xen_mark_pinned(struct mm_struct *mm, struct page *page,
* The init_mm pagetable is really pinned as soon as its created, but * The init_mm pagetable is really pinned as soon as its created, but
* that's before we have page structures to store the bits. So do all * that's before we have page structures to store the bits. So do all
* the book-keeping now once struct pages for allocated pages are * the book-keeping now once struct pages for allocated pages are
* initialized. This happens only after free_all_bootmem() is called. * initialized. This happens only after memblock_free_all() is called.
*/ */
static void __init xen_after_bootmem(void) static void __init xen_after_bootmem(void)
{ {
......
...@@ -152,7 +152,7 @@ void __init mem_init(void) ...@@ -152,7 +152,7 @@ void __init mem_init(void)
max_mapnr = max_pfn - ARCH_PFN_OFFSET; max_mapnr = max_pfn - ARCH_PFN_OFFSET;
high_memory = (void *)__va(max_low_pfn << PAGE_SHIFT); high_memory = (void *)__va(max_low_pfn << PAGE_SHIFT);
free_all_bootmem(); memblock_free_all();
mem_init_print_info(NULL); mem_init_print_info(NULL);
pr_info("virtual kernel memory layout:\n" pr_info("virtual kernel memory layout:\n"
......
...@@ -26,7 +26,7 @@ extern unsigned long max_pfn; ...@@ -26,7 +26,7 @@ extern unsigned long max_pfn;
*/ */
extern unsigned long long max_possible_pfn; extern unsigned long long max_possible_pfn;
extern unsigned long free_all_bootmem(void); extern unsigned long memblock_free_all(void);
extern void reset_node_managed_pages(pg_data_t *pgdat); extern void reset_node_managed_pages(pg_data_t *pgdat);
extern void reset_all_zones_managed_pages(void); extern void reset_all_zones_managed_pages(void);
......
...@@ -1360,7 +1360,7 @@ static void * __init memblock_alloc_internal( ...@@ -1360,7 +1360,7 @@ static void * __init memblock_alloc_internal(
/* /*
* Detect any accidental use of these APIs after slab is ready, as at * Detect any accidental use of these APIs after slab is ready, as at
* this moment memblock may be deinitialized already and its * this moment memblock may be deinitialized already and its
* internal data may be destroyed (after execution of free_all_bootmem) * internal data may be destroyed (after execution of memblock_free_all)
*/ */
if (WARN_ON_ONCE(slab_is_available())) if (WARN_ON_ONCE(slab_is_available()))
return kzalloc_node(size, GFP_NOWAIT, nid); return kzalloc_node(size, GFP_NOWAIT, nid);
......
...@@ -111,11 +111,11 @@ void __init reset_all_zones_managed_pages(void) ...@@ -111,11 +111,11 @@ void __init reset_all_zones_managed_pages(void)
} }
/** /**
* free_all_bootmem - release free pages to the buddy allocator * memblock_free_all - release free pages to the buddy allocator
* *
* Return: the number of pages actually released. * Return: the number of pages actually released.
*/ */
unsigned long __init free_all_bootmem(void) unsigned long __init memblock_free_all(void)
{ {
unsigned long pages; unsigned long pages;
......
...@@ -5476,7 +5476,7 @@ overlap_memmap_init(unsigned long zone, unsigned long *pfn) ...@@ -5476,7 +5476,7 @@ overlap_memmap_init(unsigned long zone, unsigned long *pfn)
/* /*
* Initially all pages are reserved - free ones are freed * Initially all pages are reserved - free ones are freed
* up by free_all_bootmem() once the early boot process is * up by memblock_free_all() once the early boot process is
* done. Non-atomic initialization, single-pass. * done. Non-atomic initialization, single-pass.
*/ */
void __meminit memmap_init_zone(unsigned long size, int nid, unsigned long zone, void __meminit memmap_init_zone(unsigned long size, int nid, unsigned long zone,
......
...@@ -21,7 +21,7 @@ bool page_poisoning_enabled(void) ...@@ -21,7 +21,7 @@ bool page_poisoning_enabled(void)
{ {
/* /*
* Assumes that debug_pagealloc_enabled is set before * Assumes that debug_pagealloc_enabled is set before
* free_all_bootmem. * memblock_free_all.
* Page poisoning is debug page alloc for some arches. If * Page poisoning is debug page alloc for some arches. If
* either of those options are enabled, enable poisoning. * either of those options are enabled, enable poisoning.
*/ */
......
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