Re: [PATCHv3 2/2] arm: use max_lowmem_limit in find_limit()

2015-06-10 Thread Russell King - ARM Linux
On Thu, Jun 11, 2015 at 02:59:33AM +0800, Min-Hua Chen wrote:
> 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 

NAK, this is a known build breaker.

-- 
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up
according to speedtest.net.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCHv3 2/2] arm: use max_lowmem_limit in find_limit()

2015-06-10 Thread Min-Hua Chen
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 
---
 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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCHv3 2/2] arm: use max_lowmem_limit in find_limit()

2015-06-10 Thread Min-Hua Chen
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.c...@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

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCHv3 2/2] arm: use max_lowmem_limit in find_limit()

2015-06-10 Thread Russell King - ARM Linux
On Thu, Jun 11, 2015 at 02:59:33AM +0800, Min-Hua Chen wrote:
 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.c...@gmail.com

NAK, this is a known build breaker.

-- 
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up
according to speedtest.net.
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/