Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752515AbbELCyi (ORCPT ); Mon, 11 May 2015 22:54:38 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42918 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752191AbbELCyf (ORCPT ); Mon, 11 May 2015 22:54:35 -0400 From: Laura Abbott To: Russell King , Mark Rutland , Arnd Bergmann , Nicolas Pitre , Stefan Agner Cc: Laura Abbott , Catalin Marinas , Will Deacon , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Hans de Goede Subject: [PATCH] arm: Don't use memblock limit for the lowmem bound Date: Mon, 11 May 2015 19:53:41 -0700 Message-Id: <1431399221-25337-1-git-send-email-labbott@fedoraproject.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1496 Lines: 47 From: Laura Abbott The memblock limit is currently used in find_limits to find the bounds for ZONE_NORMAL. The memblock limit may need to be rounded down a PMD size to ensure allocations are fully mapped though. This has the side effect of reducing the amount of memory in ZONE_NORMAL. Since we generally want to optimize for more lowmem, fix this by using arm_lowmem_limit to calculate the bounds. This what is used for actually mapping lowmem anyway. Before: # cat /proc/zoneinfo | grep managed managed 62920 After: # cat /proc/zoneinfo | grep managed managed 63336 Signed-off-by: Laura Abbott --- 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()); } -- 2.1.0 -- 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/