Commit 3ecc6834 authored by Mike Rapoport's avatar Mike Rapoport Committed by Linus Torvalds
Browse files

memblock: rename memblock_free to memblock_phys_free

Since memblock_free() operates on a physical range, make its name
reflect it and rename it to memblock_phys_free(), so it will be a
logical counterpart to memblock_phys_alloc().

The callers are updated with the below semantic patch:

    @@
    expression addr;
    expression size;
    @@
    - memblock_free(addr, size);
    + memblock_phys_free(addr, size);

Link: https://lkml.kernel.org/r/20210930185031.18648-6-rppt@kernel.org


Signed-off-by: default avatarMike Rapoport <rppt@linux.ibm.com>
Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: Juergen Gross <jgross@suse.com>
Cc: Shahab Vahedi <Shahab.Vahedi@synopsys.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 621d9739
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -233,7 +233,8 @@ albacore_init_arch(void)
			unsigned long size;

			size = initrd_end - initrd_start;
			memblock_free(__pa(initrd_start), PAGE_ALIGN(size));
			memblock_phys_free(__pa(initrd_start),
					   PAGE_ALIGN(size));
			if (!move_initrd(pci_mem))
				printk("irongate_init_arch: initrd too big "
				       "(%ldK)\ndisabling initrd\n",
+1 −1
Original line number Diff line number Diff line
@@ -173,7 +173,7 @@ static void __init highmem_init(void)
#ifdef CONFIG_HIGHMEM
	unsigned long tmp;

	memblock_free(high_mem_start, high_mem_sz);
	memblock_phys_free(high_mem_start, high_mem_sz);
	for (tmp = min_high_pfn; tmp < max_high_pfn; tmp++)
		free_highmem_page(pfn_to_page(tmp));
#endif
+1 −1
Original line number Diff line number Diff line
@@ -339,7 +339,7 @@ static int __init hip04_smp_init(void)
err_sysctrl:
	iounmap(relocation);
err_reloc:
	memblock_free(hip04_boot_method[0], hip04_boot_method[1]);
	memblock_phys_free(hip04_boot_method[0], hip04_boot_method[1]);
err:
	return ret;
}
+1 −1
Original line number Diff line number Diff line
@@ -158,7 +158,7 @@ phys_addr_t __init arm_memblock_steal(phys_addr_t size, phys_addr_t align)
		panic("Failed to steal %pa bytes at %pS\n",
		      &size, (void *)_RET_IP_);

	memblock_free(phys, size);
	memblock_phys_free(phys, size);
	memblock_remove(phys, size);

	return phys;
+2 −2
Original line number Diff line number Diff line
@@ -738,7 +738,7 @@ void __init paging_init(void)
	cpu_replace_ttbr1(lm_alias(swapper_pg_dir));
	init_mm.pgd = swapper_pg_dir;

	memblock_free(__pa_symbol(init_pg_dir),
	memblock_phys_free(__pa_symbol(init_pg_dir),
			   __pa_symbol(init_pg_end) - __pa_symbol(init_pg_dir));

	memblock_allow_resize();
Loading