memblock: rename free_all_bootmem to memblock_free_all
authorMike Rapoport <rppt@linux.vnet.ibm.com>
Tue, 30 Oct 2018 22:09:30 +0000 (15:09 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 31 Oct 2018 15:54:16 +0000 (08:54 -0700)
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.com
Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
Acked-by: Michal 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: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
35 files changed:
arch/alpha/mm/init.c
arch/arc/mm/init.c
arch/arm/mm/init.c
arch/arm64/mm/init.c
arch/c6x/mm/init.c
arch/h8300/mm/init.c
arch/hexagon/mm/init.c
arch/ia64/mm/init.c
arch/m68k/mm/init.c
arch/microblaze/mm/init.c
arch/mips/loongson64/loongson-3/numa.c
arch/mips/mm/init.c
arch/mips/sgi-ip27/ip27-memory.c
arch/nds32/mm/init.c
arch/nios2/mm/init.c
arch/openrisc/mm/init.c
arch/parisc/mm/init.c
arch/powerpc/mm/mem.c
arch/riscv/mm/init.c
arch/s390/mm/init.c
arch/sh/mm/init.c
arch/sparc/mm/init_32.c
arch/sparc/mm/init_64.c
arch/um/kernel/mem.c
arch/unicore32/mm/init.c
arch/x86/mm/highmem_32.c
arch/x86/mm/init_32.c
arch/x86/mm/init_64.c
arch/x86/xen/mmu_pv.c
arch/xtensa/mm/init.c
include/linux/bootmem.h
mm/memblock.c
mm/nobootmem.c
mm/page_alloc.c
mm/page_poison.c

index 9d74520298abb3bc6d04302a8a0ce1fdaf171b23..853d153449345ff064d76ec61e560cebb91090ba 100644 (file)
@@ -282,7 +282,7 @@ mem_init(void)
 {
        set_max_mapnr(max_low_pfn);
        high_memory = (void *) __va(max_low_pfn * PAGE_SIZE);
-       free_all_bootmem();
+       memblock_free_all();
        mem_init_print_info(NULL);
 }
 
index ba145065c579bfff5af1d0ca4e569a8b8c49da32..0f29c6548779b00768af265bcd1404a042d764da 100644 (file)
@@ -218,7 +218,7 @@ void __init mem_init(void)
                free_highmem_page(pfn_to_page(tmp));
 #endif
 
-       free_all_bootmem();
+       memblock_free_all();
        mem_init_print_info(NULL);
 }
 
index 0cc8e04295a40dc1d16f308396afdfb7540aa48c..d421a10c93a83b22327f5cb5b85f88402aa8ff4d 100644 (file)
@@ -508,7 +508,7 @@ void __init mem_init(void)
 
        /* this will put all unused low memory onto the freelists */
        free_unused_memmap();
-       free_all_bootmem();
+       memblock_free_all();
 
 #ifdef CONFIG_SA1111
        /* now that our DMA memory is actually so designated, we can free it */
index 2ddb1c5e988d810e15f29e037d04ded55c74e1c5..d8d73073835fcf10168bade103b7eb225cbd1b82 100644 (file)
@@ -599,7 +599,7 @@ void __init mem_init(void)
        free_unused_memmap();
 #endif
        /* this will put all unused low memory onto the freelists */
-       free_all_bootmem();
+       memblock_free_all();
 
        kexec_reserve_crashkres_pages();
 
index dc369ad8b0bae667e670865f9214360f4d332899..3383df8b35085c817deb7d3c70f82da224276a97 100644 (file)
@@ -62,7 +62,7 @@ void __init mem_init(void)
        high_memory = (void *)(memory_end & PAGE_MASK);
 
        /* this will put all memory onto the freelists */
-       free_all_bootmem();
+       memblock_free_all();
 
        mem_init_print_info(NULL);
 }
index 5d31ac9d7a8d2fb94453e4a8e745202bcc8168e2..f2bf4487aabdf69b978b3bfd1f5a26b3d688d147 100644 (file)
@@ -96,7 +96,7 @@ void __init mem_init(void)
        max_mapnr = MAP_NR(high_memory);
 
        /* this will put all low memory onto the freelists */
-       free_all_bootmem();
+       memblock_free_all();
 
        mem_init_print_info(NULL);
 }
index d789b9cc0189458b2aa9da85c6410bac5af36e44..88643faf39813749bb3cb6f6492f6b29ba141105 100644 (file)
@@ -68,7 +68,7 @@ unsigned long long kmap_generation;
 void __init mem_init(void)
 {
        /*  No idea where this is actually declared.  Seems to evade LXR.  */
-       free_all_bootmem();
+       memblock_free_all();
        mem_init_print_info(NULL);
 
        /*
index 2169ca52bdf455beeac31f553b6f1e9fa2c777ba..43ea4a47163dbb704eb57c1d3aab0e73dc074175 100644 (file)
@@ -627,7 +627,7 @@ mem_init (void)
 
        set_max_mapnr(max_low_pfn);
        high_memory = __va(max_low_pfn * PAGE_SIZE);
-       free_all_bootmem();
+       memblock_free_all();
        mem_init_print_info(NULL);
 
        /*
index 977363eda125cc6fd713306de30b4f0430c16d7c..ae49ae4d30494aed7dfee567f1d8df0e1e81c443 100644 (file)
@@ -140,7 +140,7 @@ static inline void init_pointer_tables(void)
 void __init mem_init(void)
 {
        /* this will put all memory onto the freelists */
-       free_all_bootmem();
+       memblock_free_all();
        init_pointer_tables();
        mem_init_print_info(NULL);
 }
index 8c7f074ec20ffab651187b34a1b916e547570cfe..9989740d397a7e357eb3b9584ceac3e2b3e97e4b 100644 (file)
@@ -204,7 +204,7 @@ void __init mem_init(void)
        high_memory = (void *)__va(memory_start + lowmem_size - 1);
 
        /* this will put all memory onto the freelists */
-       free_all_bootmem();
+       memblock_free_all();
 #ifdef CONFIG_HIGHMEM
        highmem_setup();
 #endif
index c1e6ec52c614eb0265fcb6189ad09caaa4185f2f..703ad4536fe084268e8983f3d4fdeb414f9f7729 100644 (file)
@@ -272,7 +272,7 @@ void __init paging_init(void)
 void __init mem_init(void)
 {
        high_memory = (void *) __va(get_num_physpages() << PAGE_SHIFT);
-       free_all_bootmem();
+       memblock_free_all();
        setup_zero_pages();     /* This comes from node 0 */
        mem_init_print_info(NULL);
 }
index 842a49ef9909a3009eae7181fd06feb5be61200b..0893b6136498ea7dca464d5f105be3a5d6730285 100644 (file)
@@ -463,7 +463,7 @@ void __init mem_init(void)
        high_memory = (void *) __va(max_low_pfn << PAGE_SHIFT);
 
        maar_init();
-       free_all_bootmem();
+       memblock_free_all();
        setup_zero_pages();     /* Setup zeroed pages.  */
        mem_init_free_highmem();
        mem_init_print_info(NULL);
index 6f7bef052b7f44b44219df28b030a448e9bedffb..cb1f1a6a166d0cd9019a9278cee18753ab323c59 100644 (file)
@@ -475,7 +475,7 @@ void __init paging_init(void)
 void __init mem_init(void)
 {
        high_memory = (void *) __va(get_num_physpages() << PAGE_SHIFT);
-       free_all_bootmem();
+       memblock_free_all();
        setup_zero_pages();     /* This comes from node 0 */
        mem_init_print_info(NULL);
 }
index 5af81b866aa5770c06192a0780c4077eb1a34dc4..66d3e9cf498dce965d38ecbb51098846ba35793f 100644 (file)
@@ -192,7 +192,7 @@ void __init mem_init(void)
        free_highmem();
 
        /* this will put all low memory onto the freelists */
-       free_all_bootmem();
+       memblock_free_all();
        mem_init_print_info(NULL);
 
        pr_info("virtual kernel memory layout:\n"
index c92fe4234009ba59ab366b8ab9ca6b848b0c2797..12923501d94fed929ed262a36221cf0ef55d0453 100644 (file)
@@ -73,7 +73,7 @@ void __init mem_init(void)
        high_memory = __va(end_mem);
 
        /* this will put all memory onto the freelists */
-       free_all_bootmem();
+       memblock_free_all();
        mem_init_print_info(NULL);
 }
 
index b7670de26c11119ec9420aac4ef73305c6f500c3..91a6a9ab7598de9f15140d58226577132bb71177 100644 (file)
@@ -213,7 +213,7 @@ void __init mem_init(void)
        memset((void *)empty_zero_page, 0, PAGE_SIZE);
 
        /* this will put all low memory onto the freelists */
-       free_all_bootmem();
+       memblock_free_all();
 
        mem_init_print_info(NULL);
 
index f88a52b8531cb28433a3277feb802ccbb13bad2c..7e7a3126c5e9669f4750a4ec51bf4c0917a60797 100644 (file)
@@ -621,7 +621,7 @@ void __init mem_init(void)
 
        high_memory = __va((max_pfn << PAGE_SHIFT));
        set_max_mapnr(page_to_pfn(virt_to_page(high_memory - 1)) + 1);
-       free_all_bootmem();
+       memblock_free_all();
 
 #ifdef CONFIG_PA11
        if (boot_cpu_data.cpu_type == pcxl2 || boot_cpu_data.cpu_type == pcxl) {
index dd949d6649a26efac4b2f5339d0ba5710310e7d3..b3fe79064a692c3f7f5c53da3722b44a210852f7 100644 (file)
@@ -349,7 +349,7 @@ void __init mem_init(void)
 
        high_memory = (void *) __va(max_low_pfn * PAGE_SIZE);
        set_max_mapnr(max_pfn);
-       free_all_bootmem();
+       memblock_free_all();
 
 #ifdef CONFIG_HIGHMEM
        {
index 58a522f9bcc319ae5d40a8ae15da5d9021921ebd..d58c111099b31d7c5418ba65813cbacce56b4a64 100644 (file)
@@ -55,7 +55,7 @@ void __init mem_init(void)
 #endif /* CONFIG_FLATMEM */
 
        high_memory = (void *)(__va(PFN_PHYS(max_low_pfn)));
-       free_all_bootmem();
+       memblock_free_all();
 
        mem_init_print_info(NULL);
 }
index 92d7a153e72a0fe8bad784552d7a142a9d03ba69..873f6ee1c46dee1c4508bc0a2ca283f19180c118 100644 (file)
@@ -139,7 +139,7 @@ void __init mem_init(void)
        cmma_init();
 
        /* this will put all low memory onto the freelists */
-       free_all_bootmem();
+       memblock_free_all();
        setup_zero_pages();     /* Setup zeroed pages. */
 
        cmma_init_nodat();
index c884b760e52fc8cb34cdfb2df6d88504d3377677..21447f866415d4e889238f96b8770de58d3cd904 100644 (file)
@@ -350,7 +350,7 @@ void __init mem_init(void)
                high_memory = max_t(void *, high_memory,
                                    __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 */
        cpu_cache_init();
index 885dd3881874e800b9016763e913a28bb4ae9ae4..880714565c40af3096b6fe69edf1d5a6a601bc0d 100644 (file)
@@ -277,7 +277,7 @@ void __init mem_init(void)
 
        max_mapnr = last_valid_pfn - pfn_base;
        high_memory = __va(max_low_pfn << PAGE_SHIFT);
-       free_all_bootmem();
+       memblock_free_all();
 
        for (i = 0; sp_banks[i].num_bytes != 0; i++) {
                unsigned long start_pfn = sp_banks[i].base_addr >> PAGE_SHIFT;
index 6f965e6d01cc43b60223063c1ae3c6436e9d3429..a8c3453195e63e4ec42c5404c62cc5348a405835 100644 (file)
@@ -2545,12 +2545,12 @@ void __init mem_init(void)
 {
        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
         * 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.
         */
        register_page_bootmem_info();
index 3555c139389c8091378839115f976fdead304816..2c672a8f457110796abb9a6f3743d2734cd6aa5d 100644 (file)
@@ -51,7 +51,7 @@ void __init mem_init(void)
        uml_reserved = brk_end;
 
        /* this will put all low memory onto the freelists */
-       free_all_bootmem();
+       memblock_free_all();
        max_low_pfn = totalram_pages;
        max_pfn = totalram_pages;
        mem_init_print_info(NULL);
index 4ba51991c7de1472933e01260b017baa97e0c11a..44fd0e8fbe87d58ba3c4b43364953b1df17d45dc 100644 (file)
@@ -286,7 +286,7 @@ void __init mem_init(void)
        free_unused_memmap(&meminfo);
 
        /* this will put all unused low memory onto the freelists */
-       free_all_bootmem();
+       memblock_free_all();
 
        mem_init_print_info(NULL);
        printk(KERN_NOTICE "Virtual kernel memory layout:\n"
index 6d18b70ed5a9bb808f2c976450671e7034e3169c..62915a5e0fa256f5e81cc682740b7109805688ca 100644 (file)
@@ -111,7 +111,7 @@ void __init set_highmem_pages_init(void)
 
        /*
         * 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();
        for_each_zone(zone) {
index 142c7d9f89cc218e336cc156f2a14acfa84e565a..3bbe5f58a67d5988077ebbc6d09c32addee40c34 100644 (file)
@@ -771,7 +771,7 @@ void __init mem_init(void)
 #endif
        /*
         * 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
         * pages that was already passed to the buddy allocator, hence marked as
         * not accessible in the page tables when compiled with
@@ -781,7 +781,7 @@ void __init mem_init(void)
        set_highmem_pages_init();
 
        /* this will put all low memory onto the freelists */
-       free_all_bootmem();
+       memblock_free_all();
 
        after_bootmem = 1;
        x86_init.hyper.init_after_bootmem();
index f39b51244fe2aeb72d4b4aba8aae1aecfbec82ad..bfb0bedc21d3d0da790585f433d75f477cdc8d38 100644 (file)
@@ -1188,14 +1188,14 @@ void __init mem_init(void)
        /* clear_bss() already clear the empty_zero_page */
 
        /* this will put all memory onto the freelists */
-       free_all_bootmem();
+       memblock_free_all();
        after_bootmem = 1;
        x86_init.hyper.init_after_bootmem();
 
        /*
         * 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
-        * initialized, and free_all_bootmem() initializes all the reserved
+        * initialized, and memblock_free_all() initializes all the reserved
         * deferred pages for us.
         */
        register_page_bootmem_info();
index 70ea598a37d2d525e42566bc0d86c89fdac3d79d..0d7b3ae4960bb0cc424cdc853cdf2f35a73835ae 100644 (file)
@@ -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
  * 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
- * 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)
 {
index 34aead7dcb4878bf18f48cc2087fd93b5bee95ca..f7fbe63349392f3d31c5ac52dc5e1daf603d9216 100644 (file)
@@ -152,7 +152,7 @@ void __init mem_init(void)
        max_mapnr = max_pfn - ARCH_PFN_OFFSET;
        high_memory = (void *)__va(max_low_pfn << PAGE_SHIFT);
 
-       free_all_bootmem();
+       memblock_free_all();
 
        mem_init_print_info(NULL);
        pr_info("virtual kernel memory layout:\n"
index bcc7e2fcb6a66feea23cedcee850d2284684da5e..b58873a567b2d87432cb5cbf1feb5a3b4a234025 100644 (file)
@@ -26,7 +26,7 @@ extern unsigned long max_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_all_zones_managed_pages(void);
 
index 58340de3ebc66e6432bdf7d948dd61091885677b..e2f397174734e5f9df57040dc3692c43f9d68d0f 100644 (file)
@@ -1360,7 +1360,7 @@ static void * __init memblock_alloc_internal(
        /*
         * Detect any accidental use of these APIs after slab is ready, as at
         * 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()))
                return kzalloc_node(size, GFP_NOWAIT, nid);
index ee0f7fc37fd1298084a4b85df8a6c25296bb2560..bb64b09ca4d2625313e470575231d2ce4b7f0413 100644 (file)
@@ -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.
  */
-unsigned long __init free_all_bootmem(void)
+unsigned long __init memblock_free_all(void)
 {
        unsigned long pages;
 
index 8ca6954fdcdccc45897f7753a8e175a3e6d8c6be..6e9b8387a7061aefa1be4f6cceef03b624987f09 100644 (file)
@@ -5476,7 +5476,7 @@ overlap_memmap_init(unsigned long zone, unsigned long *pfn)
 
 /*
  * 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.
  */
 void __meminit memmap_init_zone(unsigned long size, int nid, unsigned long zone,
index aa2b3d34e8eaa26018267314fe88568b382dbebc..f7e2a676365a10256368d3fe9e5dfccfbd5cc17e 100644 (file)
@@ -21,7 +21,7 @@ bool page_poisoning_enabled(void)
 {
        /*
         * Assumes that debug_pagealloc_enabled is set before
-        * free_all_bootmem.
+        * memblock_free_all.
         * Page poisoning is debug page alloc for some arches. If
         * either of those options are enabled, enable poisoning.
         */