Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752885AbaBEXkS (ORCPT ); Wed, 5 Feb 2014 18:40:18 -0500 Received: from devils.ext.ti.com ([198.47.26.153]:36515 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750952AbaBEXkP (ORCPT ); Wed, 5 Feb 2014 18:40:15 -0500 Message-ID: <52F2CBC0.3030305@ti.com> Date: Wed, 5 Feb 2014 18:39:44 -0500 From: Santosh Shilimkar User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Santosh Shilimkar , Russell King CC: , , Yinghai Lu , "Strashko, Grygorii" , Andrew Morton Subject: Re: [PATCH] ARM: mm: Fix the memblock allocation for LPAE machines References: <1391285687-20534-1-git-send-email-santosh.shilimkar@ti.com> In-Reply-To: <1391285687-20534-1-git-send-email-santosh.shilimkar@ti.com> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Russell, On Saturday 01 February 2014 03:14 PM, Santosh Shilimkar wrote: > Commit ad6492b8 added much needed memblock_virt_alloc_low() and further > commit 07bacb3 {memblock, bootmem: restore goal for alloc_low} fixed the > issue with low memory limit thansk to Yinghai. But even after all these fixes, > there is still one case where the limit check done with ARCH_LOW_ADDRESS_LIMIT > for low memory fails. Russell pointed out the issue with 32 bit LPAE machines > in below thread. > https://lkml.org/lkml/2014/1/28/364 > > Since on some LPAE machines where memory start address is beyond 4GB, > the low memory marker in memblock will be set to default > ARCH_LOW_ADDRESS_LIMIT which is wrong. We can fix this by letting > architectures set the ARCH_LOW_ADDRESS_LIMIT using another export > similar to memblock_set_current_limit() but am not sure whether > its worth the trouble. Tell me if you think otherwise. > > Rather am just trying to fix that one broken case using memblock_virt_alloc() > in setup code since the memblock.current_limit is updated appropriately > makes it work on all ARM 32 bit machines. > > Cc: Yinghai Lu > Cc: Russell King > Cc: Strashko, Grygorii > Cc: Andrew Morton > Signed-off-by: Santosh Shilimkar > --- Whats you say here ? We should get the fix for the issue. If you are ok, I can drop the patch in patch system. > arch/arm/kernel/setup.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c > index b0df976..1e8b030 100644 > --- a/arch/arm/kernel/setup.c > +++ b/arch/arm/kernel/setup.c > @@ -731,7 +731,7 @@ static void __init request_standard_resources(const struct machine_desc *mdesc) > kernel_data.end = virt_to_phys(_end - 1); > > for_each_memblock(memory, region) { > - res = memblock_virt_alloc_low(sizeof(*res), 0); > + res = memblock_virt_alloc(sizeof(*res), 0); > res->name = "System RAM"; > res->start = __pfn_to_phys(memblock_region_memory_base_pfn(region)); > res->end = __pfn_to_phys(memblock_region_memory_end_pfn(region)) - 1; > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/