From patchwork Mon Jun 23 20:47:55 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laura Abbott X-Patchwork-Id: 4404501 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 2BD9C9F26E for ; Mon, 23 Jun 2014 20:50:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 503A320225 for ; Mon, 23 Jun 2014 20:50:57 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 60126201FA for ; Mon, 23 Jun 2014 20:50:56 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WzBA8-0000ll-3v; Mon, 23 Jun 2014 20:48:24 +0000 Received: from smtp.codeaurora.org ([198.145.11.231]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WzBA4-0000jj-P6 for linux-arm-kernel@lists.infradead.org; Mon, 23 Jun 2014 20:48:21 +0000 Received: from smtp.codeaurora.org (localhost [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id 9079D13F873; Mon, 23 Jun 2014 20:47:59 +0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 486) id 7F6F513F974; Mon, 23 Jun 2014 20:47:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from [10.42.111.116] (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: lauraa@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id D7DBE13F873; Mon, 23 Jun 2014 20:47:57 +0000 (UTC) Message-ID: <53A8927B.3020409@codeaurora.org> Date: Mon, 23 Jun 2014 13:47:55 -0700 From: Laura Abbott User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: =?ISO-8859-1?Q?Uwe_Kleine-K=F6nig?= Subject: Re: [PATCHv5 2/2] arm: Get rid of meminfo References: <1396544698-15596-1-git-send-email-lauraa@codeaurora.org> <1396544698-15596-3-git-send-email-lauraa@codeaurora.org> <20140623091754.GD14781@pengutronix.de> In-Reply-To: <20140623091754.GD14781@pengutronix.de> X-Virus-Scanned: ClamAV using ClamSMTP X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140623_134820_909821_7BB1B860 X-CRM114-Status: GOOD ( 21.31 ) X-Spam-Score: -0.0 (/) Cc: Nicolas Pitre , Andrew Lunn , Catalin Marinas , Will Deacon , Grant Likely , linux-mm@kvack.org, Daniel Walker , Marek Szyprowski , Kukjin Kim , Russell King , David Brown , Sebastian Hesselbarth , Grygorii Strashko , Jason Cooper , linux-arm-msm@vger.kernel.org, Haojian Zhuang , Leif Lindholm , Ben Dooks , linux-arm-kernel@lists.infradead.org, Courtney Cavin , Eric Miao , Ard Biesheuvel , linux-kernel@vger.kernel.org, Santosh Shilimkar , kernel@pengutronix.de, Andrew Morton X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Thanks for the report. On 6/23/2014 2:17 AM, Uwe Kleine-König wrote: > This patch is in 3.16-rc1 as 1c2f87c22566cd057bc8cde10c37ae9da1a1bb76 > now. > > Unfortunately it makes my efm32 machine unbootable. > > With earlyprintk enabled I get the following output: > > [ 0.000000] Booting Linux on physical CPU 0x0 > [ 0.000000] Linux version 3.15.0-rc1-00028-g1c2f87c22566-dirty (ukleinek@perseus) (gcc version 4.7.2 (OSELAS.Toolchain-2012.12.1) ) #280 PREEMPT Mon Jun 23 11:05:34 CEST 2014 > [ 0.000000] CPU: ARMv7-M [412fc231] revision 1 (ARMv7M), cr=00000000 > [ 0.000000] CPU: unknown data cache, unknown instruction cache > [ 0.000000] Machine model: Energy Micro Giant Gecko Development Kit > [ 0.000000] debug: ignoring loglevel setting. > [ 0.000000] bootconsole [earlycon0] enabled > [ 0.000000] On node 0 totalpages: 1024 > [ 0.000000] free_area_init_node: node 0, pgdat 880208f4, node_mem_map 00000000 > [ 0.000000] Normal zone: 3840 pages exceeds freesize 1024 This looks off. The number of pages for the memmap exceeds the available free size. Working backwards, I think the wrong bounds are being calculated in find_limits in arch/arm/mm/init.c . max_low is now calculated via the current limit but nommu never sets a limit unlike the mmu case. Can you try the following patch and see if it fixes the issue? If this doesn't work, can you share working bootup logs so I can do a bit more compare and contrast? Thanks, Laura ---8<---- From 9b19241d577caf91928e26e55413047d1be90feb Mon Sep 17 00:00:00 2001 From: Laura Abbott Date: Mon, 23 Jun 2014 13:26:56 -0700 Subject: [PATCH] arm: Set memblock limit for nommu Commit 1c2f87c (ARM: 8025/1: Get rid of meminfo) changed find_limits to use memblock_get_current_limit for calculating the max_low pfn. nommu targets never actually set a limit on memblock though which means memblock_get_current_limit will just return the default value. Set the memblock_limit to be the end of DDR to make sure bounds are calculated correctly. Signed-off-by: Laura Abbott --- arch/arm/mm/nommu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mm/nommu.c b/arch/arm/mm/nommu.c index da1874f..a014dfa 100644 --- a/arch/arm/mm/nommu.c +++ b/arch/arm/mm/nommu.c @@ -300,6 +300,7 @@ void __init sanity_check_meminfo(void) sanity_check_meminfo_mpu(); end = memblock_end_of_DRAM(); high_memory = __va(end - 1) + 1; + memblock_set_current_limit(end); } /*