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

memblock: remove _virt from APIs returning virtual address

The conversion is done using

sed -i 's@memblock_virt_alloc@memblock_alloc@g' \
	$(git grep -l memblock_virt_alloc)

Link: http://lkml.kernel.org/r/1536927045-23536-8-git-send-email-rppt@linux.vnet.ibm.com


Signed-off-by: default avatarMike Rapoport <rppt@linux.vnet.ibm.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 Hocko <mhocko@suse.com>
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 9a8dd708
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -857,7 +857,7 @@ static void __init request_standard_resources(const struct machine_desc *mdesc)
		 */
		boot_alias_start = phys_to_idmap(start);
		if (arm_has_idmap_alias() && boot_alias_start != IDMAP_INVALID_ADDR) {
			res = memblock_virt_alloc(sizeof(*res), 0);
			res = memblock_alloc(sizeof(*res), 0);
			res->name = "System RAM (boot alias)";
			res->start = boot_alias_start;
			res->end = phys_to_idmap(end);
@@ -865,7 +865,7 @@ static void __init request_standard_resources(const struct machine_desc *mdesc)
			request_resource(&iomem_resource, res);
		}

		res = memblock_virt_alloc(sizeof(*res), 0);
		res = memblock_alloc(sizeof(*res), 0);
		res->name  = "System RAM";
		res->start = start;
		res->end = end;
+3 −3
Original line number Diff line number Diff line
@@ -726,7 +726,7 @@ static int __init _setup_clkctrl_provider(struct device_node *np)
	u64 size;
	int i;

	provider = memblock_virt_alloc(sizeof(*provider), 0);
	provider = memblock_alloc(sizeof(*provider), 0);
	if (!provider)
		return -ENOMEM;

@@ -736,12 +736,12 @@ static int __init _setup_clkctrl_provider(struct device_node *np)
		of_property_count_elems_of_size(np, "reg", sizeof(u32)) / 2;

	provider->addr =
		memblock_virt_alloc(sizeof(void *) * provider->num_addrs, 0);
		memblock_alloc(sizeof(void *) * provider->num_addrs, 0);
	if (!provider->addr)
		return -ENOMEM;

	provider->size =
		memblock_virt_alloc(sizeof(u32) * provider->num_addrs, 0);
		memblock_alloc(sizeof(u32) * provider->num_addrs, 0);
	if (!provider->size)
		return -ENOMEM;

+1 −1
Original line number Diff line number Diff line
@@ -38,7 +38,7 @@ static pgd_t tmp_pg_dir[PTRS_PER_PGD] __initdata __aligned(PGD_SIZE);

static phys_addr_t __init kasan_alloc_zeroed_page(int node)
{
	void *p = memblock_virt_alloc_try_nid(PAGE_SIZE, PAGE_SIZE,
	void *p = memblock_alloc_try_nid(PAGE_SIZE, PAGE_SIZE,
					      __pa(MAX_DMA_ADDRESS),
					      MEMBLOCK_ALLOC_ACCESSIBLE, node);
	return __pa(p);
+1 −1
Original line number Diff line number Diff line
@@ -168,7 +168,7 @@ static void * __init pcpu_fc_alloc(unsigned int cpu, size_t size,
{
	int nid = early_cpu_to_node(cpu);

	return  memblock_virt_alloc_try_nid(size, align,
	return  memblock_alloc_try_nid(size, align,
			__pa(MAX_DMA_ADDRESS), MEMBLOCK_ALLOC_ACCESSIBLE, nid);
}

+1 −1
Original line number Diff line number Diff line
@@ -859,7 +859,7 @@ static void __init arch_mem_init(char **cmdline_p)
	 * Prevent memblock from allocating high memory.
	 * This cannot be done before max_low_pfn is detected, so up
	 * to this point is possible to only reserve physical memory
	 * with memblock_reserve; memblock_virt_alloc* can be used
	 * with memblock_reserve; memblock_alloc* can be used
	 * only after this point
	 */
	memblock_set_current_limit(PFN_PHYS(max_low_pfn));
Loading