From mboxrd@z Thu Jan 1 00:00:00 1970 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 94B19C6FA8A for ; Fri, 9 Sep 2022 15:33:08 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 61BE084B2B; Fri, 9 Sep 2022 17:33:06 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="feWv4h4u"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 359F684B64; Fri, 9 Sep 2022 17:33:04 +0200 (CEST) Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) (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 E724B84928 for ; Fri, 9 Sep 2022 17:33:00 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=pali@kernel.org Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id A170862049; Fri, 9 Sep 2022 15:32:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E40C0C433D7; Fri, 9 Sep 2022 15:32:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1662737579; bh=DaF4D5ZnNGn2ccqOv24nE41oXDwXom3yBJOinrh02n8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=feWv4h4u8tAgU2jGFK6O0i6WoLRI+FNy8rWwvhtoUB2r425PtBi31Le+H9ONxiPKV eo7A4ufJos+0PYDHODJZMgGYkqQJnYepOMLOCYgw84BYAoKDqakaovg5v97q6wfLH/ +kwLKvXiT8M4oD/138FrpbnRas7rReRyb+nQ09o9d3tgcWnxxNy7o1VIhEqi4BKBJV E+/qkjyIDAtCEA728oahI2T9sJAaozN37xokEVaXM8oE9irSL/pqF/Df32lfA6zFpB za5EgbZ6ifxzzW83PLyK4v9yeuPFRtcUZKB1QI0+JXemLPkqm1rcpK1Y/Zqm5TRxXg Eb+siR3GK6IUQ== Received: by pali.im (Postfix) id 5C8AD1231; Fri, 9 Sep 2022 17:32:56 +0200 (CEST) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: u-boot@lists.denx.de, =?UTF-8?q?Marek=20Beh=C3=BAn?= , Peng Fan , Tom Rini Subject: [PATCH 1/9] common/memsize.c: Fix get_effective_memsize() to always check for CONFIG_MAX_MEM_MAPPED Date: Fri, 9 Sep 2022 17:32:38 +0200 Message-Id: <20220909153246.8455-2-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20220909153246.8455-1-pali@kernel.org> References: <20220909153246.8455-1-pali@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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.6 at phobos.denx.de X-Virus-Status: Clean CONFIG_MAX_MEM_MAPPED when defined specifies upper memory mapped limit. So check for it always, and not only when CONFIG_VERY_BIG_RAM is defined. Signed-off-by: Pali Rohár --- common/memsize.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/memsize.c b/common/memsize.c index d5d13d51bf1f..31884acca0df 100644 --- a/common/memsize.c +++ b/common/memsize.c @@ -94,7 +94,7 @@ long get_ram_size(long *base, long maxsize) phys_size_t __weak get_effective_memsize(void) { -#ifndef CONFIG_VERY_BIG_RAM +#ifndef CONFIG_MAX_MEM_MAPPED return gd->ram_size; #else /* limit stack to what we can reasonable map */ -- 2.20.1