Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0CB51C433EF for ; Tue, 15 Feb 2022 13:16:05 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D96A783754; Tue, 15 Feb 2022 14:16:03 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=nic.cz Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; secure) header.d=nic.cz header.i=@nic.cz header.b="X/nZiFVX"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 922DC836BE; Tue, 15 Feb 2022 14:16:01 +0100 (CET) Received: from mail.nic.cz (mail.nic.cz [IPv6:2001:1488:800:400::400]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 42EBC83754 for ; Tue, 15 Feb 2022 14:15:57 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=nic.cz Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=marek.behun@nic.cz Received: from dellmb (unknown [IPv6:2001:1488:fffe:6:8747:7254:5571:3010]) by mail.nic.cz (Postfix) with ESMTPSA id E287714089D; Tue, 15 Feb 2022 14:15:56 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nic.cz; s=default; t=1644930957; bh=uiKhGLfkljrwa84MPgbU60LBdSpyGQLVd7XjT0mWPjg=; h=Date:From:To; b=X/nZiFVXA+jiprKlQxSV3p/mhcx/uBUVim77Vgmg7bBb3QbFcqJ3JapQCCuR45+Er LaJsUb7Kkna0U97f4Wp8iQyrCoMfmvWdXlqLHVXM5u/Ba8LZHcvGB9bzuM6FqOdp19 ZQzKnr/XCPrOvhejUach2OGBB3+K1p4IZiqy+deU= Date: Tue, 15 Feb 2022 14:15:56 +0100 From: Marek =?UTF-8?B?QmVow7pu?= To: Pali =?UTF-8?B?Um9ow6Fy?= Cc: Stefan Roese , u-boot@lists.denx.de Subject: Re: [PATCH u-boot-mvebu 1/3] arm: mvebu: a37xx: Fix calling build_mem_map() Message-ID: <20220215141556.5ac45225@dellmb> In-Reply-To: <20220214232835.12924-2-pali@kernel.org> References: <20220214232835.12924-1-pali@kernel.org> <20220214232835.12924-2-pali@kernel.org> X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean On Tue, 15 Feb 2022 00:28:33 +0100 Pali Roh=C3=A1r wrote: > Function build_mem_map() modifies global variable mem_map. This variable = is > used by the get_page_table_size() function which is called by function > arm_reserve_mmu() (as aliased macro PGTABLE_SIZE). Function > arm_reserve_mmu() is called earlier than enable_caches() which calls > build_mem_map(). So arm_reserve_mmu() does not calculate reserved memory > correctly. >=20 > Fix this issue by calling build_mem_map() from a3700_dram_init() which is > called before arm_reserve_mmu(). >=20 > Signed-off-by: Pali Roh=C3=A1r Reviewed-by: Marek Beh=C3=BAn