linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: orca.chen@gmail.com (Min-Hua Chen)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCHv3 2/2] arm: use max_lowmem_limit in find_limit()
Date: Thu, 11 Jun 2015 02:59:33 +0800	[thread overview]
Message-ID: <1433962773-8402-3-git-send-email-orca.chen@gmail.com> (raw)
In-Reply-To: <1433962773-8402-1-git-send-email-orca.chen@gmail.com>

In commit: 1c2f87c22566cd057bc8cde10c37ae9da1a1bb76, the max_low is
set by memblock_get_current_limit(). However memblock.current_limit
can be changed by memblock_set_current_limit() any point before
find_limits().

It's better to use arm_lowmem_limit to be max_lowmem in two ways:
First, arm_lowmem_limit cannot be changed by a public API. Second, the
high_memory is set by arm_lowmem_limit and is a natural limit of
low memory area in bootmem_init().

Signed-off-by: Min-Hua Chen <orca.chen@gmail.com>
---
 arch/arm/mm/init.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
index be92fa0..b4f9513 100644
--- a/arch/arm/mm/init.c
+++ b/arch/arm/mm/init.c
@@ -89,7 +89,7 @@ __tagtable(ATAG_INITRD2, parse_tag_initrd2);
 static void __init find_limits(unsigned long *min, unsigned long *max_low,
 			       unsigned long *max_high)
 {
-	*max_low = PFN_DOWN(memblock_get_current_limit());
+	*max_low = PFN_DOWN(arm_lowmem_limit);
 	*min = PFN_UP(memblock_start_of_DRAM());
 	*max_high = PFN_DOWN(memblock_end_of_DRAM());
 }
-- 
1.7.10.4

  parent reply	other threads:[~2015-06-10 18:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-10 18:59 [PATCHv3 0/2] creating non-section aligned lowmem mappings Min-Hua Chen
2015-06-10 18:59 ` [PATCHv3 1/2] arm: fix non-section-aligned low memory mapping Min-Hua Chen
2015-06-10 22:40   ` Russell King - ARM Linux
2015-06-11  0:02     ` Min-Hua Chen
2015-06-10 18:59 ` Min-Hua Chen [this message]
2015-06-10 22:41   ` [PATCHv3 2/2] arm: use max_lowmem_limit in find_limit() Russell King - ARM Linux

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=1433962773-8402-3-git-send-email-orca.chen@gmail.com \
    --to=orca.chen@gmail.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).