microblaze: prefer memblock API returning virtual address
authorMike Rapoport <rppt@linux.ibm.com>
Fri, 8 Mar 2019 00:30:53 +0000 (16:30 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 8 Mar 2019 02:32:03 +0000 (18:32 -0800)
Rather than use the memblock_alloc_base that returns a physical address
and then convert this address to the virtual one, use appropriate
memblock function that returns a virtual address.

Link: http://lkml.kernel.org/r/1546248566-14910-3-git-send-email-rppt@linux.ibm.com
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
Tested-by: Michal Simek <michal.simek@xilinx.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Greentime Hu <green.hu@gmail.com>
Cc: Guan Xuetao <gxt@pku.edu.cn>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Jonas Bonn <jonas@southpole.se>
Cc: Mark Salter <msalter@redhat.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Rich Felker <dalias@libc.org>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Stafford Horne <shorne@gmail.com>
Cc: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
Cc: Vincent Chen <deanbo422@gmail.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>
arch/microblaze/mm/init.c

index b17fd8aafd64aabd3c667c81394a81ab6f3b8583..44f4b8910c2140a7025022f10969a70266a45e59 100644 (file)
@@ -363,8 +363,9 @@ void __init *early_get_page(void)
         * Mem start + kernel_tlb -> here is limit
         * because of mem mapping from head.S
         */
-       return __va(memblock_alloc_base(PAGE_SIZE, PAGE_SIZE,
-                               memory_start + kernel_tlb));
+       return memblock_alloc_try_nid_raw(PAGE_SIZE, PAGE_SIZE,
+                               MEMBLOCK_LOW_LIMIT, memory_start + kernel_tlb,
+                               NUMA_NO_NODE);
 }
 
 #endif /* CONFIG_MMU */