linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mike Rapoport <rppt@linux.ibm.com>
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/5] microblaze: prefer memblock API returning virtual address
Date: Sun, 25 Nov 2018 21:44:34 +0000	[thread overview]
Message-ID: <1543182277-8819-3-git-send-email-rppt@linux.ibm.com> (raw)
In-Reply-To: <1543182277-8819-1-git-send-email-rppt@linux.ibm.com>

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.

Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
---
 arch/microblaze/mm/init.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/microblaze/mm/init.c b/arch/microblaze/mm/init.c
index b17fd8a..44f4b89 100644
--- a/arch/microblaze/mm/init.c
+++ b/arch/microblaze/mm/init.c
@@ -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 */
-- 
2.7.4

  parent reply	other threads:[~2018-11-25 21:44 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-25 21:44 [PATCH 0/5] memblock: simplify several early memory allocations Mike Rapoport
2018-11-25 21:44 ` [PATCH 1/5] powerpc: prefer memblock APIs returning virtual address Mike Rapoport
2018-11-25 21:44 ` Mike Rapoport [this message]
2018-11-25 21:44 ` [PATCH 3/5] sh: " Mike Rapoport
2018-11-25 21:44 ` [PATCH 4/5] openrisc: simplify pte_alloc_one_kernel() Mike Rapoport
2018-11-27 21:16   ` Stafford Horne
2018-11-27 21:48     ` Mike Rapoport
2018-11-25 21:44 ` [PATCH 5/5] arch: simplify several early memory allocations Mike Rapoport
2018-11-26  7:03   ` Christophe LEROY
2018-11-26  7:25     ` Mike Rapoport
2018-11-26  8:21   ` Christoph Hellwig
2018-11-26  8:47     ` Mike Rapoport

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1543182277-8819-3-git-send-email-rppt@linux.ibm.com \
    --to=rppt@linux.ibm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).