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 11C14C433F5 for ; Wed, 23 Mar 2022 18:53:23 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7F4D283F88; Wed, 23 Mar 2022 19:53:20 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org 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; unprotected) header.d=chromium.org header.i=@chromium.org header.b="W8f2yZaK"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6650583FA3; Wed, 23 Mar 2022 19:53:18 +0100 (CET) Received: from mail-vs1-xe35.google.com (mail-vs1-xe35.google.com [IPv6:2607:f8b0:4864:20::e35]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id A192C83BDB for ; Wed, 23 Mar 2022 19:53:14 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@google.com Received: by mail-vs1-xe35.google.com with SMTP id i186so2476101vsc.9 for ; Wed, 23 Mar 2022 11:53:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=gfEIf/oPGiHXzTR+/ucDDH4+EoJAXYLUKPwcKy2gBuw=; b=W8f2yZaKMnYrlFUBhEuIMGfdghPDN6yzwJ+CueJszmEAN5yvjKOcU18AyLrUeO+wDS AVkIG65ViWvlW/bD0FLqQzLUSrGBtD/hiSVzFYMfGi2oomLavBBaXoj8ACq8+QPbWeVj DjTk11VaFAdFIDqm573WY9dQLjKyQBYLqh5iM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=gfEIf/oPGiHXzTR+/ucDDH4+EoJAXYLUKPwcKy2gBuw=; b=PqjrBdSmwfaa1OQDcKBoLqDsPv6jVTMLYvtBMX5Hio+9sj1xxLa7bAvLbyrv04Lzbf Sfl+jLdoHaW4tBlk8VQ6wRVqotrBmhcnUqpgWsx35JHW1Y/Niy4U9lJMJ8wKSABzNoTs ad/4vEG1i3irIuBseWrDsG5FzuiZfRzF0r2enk6I3UKAjtHckzj/Rd7SFAHTcLLhvNhi 1vAMPE4MPu8kuzToan3sAqnLE6A0Csq0a3wyXBuCtJCF0/G/9QtJyBKakjhhJm4ibGJH f0bv9UfeIDd4f4MBKh/T3kMZylJow30mEvKxoxd/tXIeNa7yzpXhd2AqmPYI+K30/5jb DYMg== X-Gm-Message-State: AOAM530n8YOfxVh3l7MQMZQFTbnccoaK9Fa3TmdKHOUPocNMOMrB0l2i NVfWEkPAzbVSfp1ICsLDfJRidwpivpstOYo6ilNRPA== X-Google-Smtp-Source: ABdhPJxjebJ5cnSpk2Jzn/i3eonBbX8QGklWNRAerKh5X9Z62+Cz9clC6yh0VACt1d6kp5bqxAFIzry4I/lTOxK62TU= X-Received: by 2002:a67:1a02:0:b0:320:a51f:8067 with SMTP id a2-20020a671a02000000b00320a51f8067mr932220vsa.38.1648061593218; Wed, 23 Mar 2022 11:53:13 -0700 (PDT) MIME-Version: 1.0 References: <20220321142631.63704-1-heiko.thiery@gmail.com> <19e21ec5-184b-10d9-9bee-8ece6dc58095@gmail.com> In-Reply-To: <19e21ec5-184b-10d9-9bee-8ece6dc58095@gmail.com> From: Simon Glass Date: Wed, 23 Mar 2022 12:53:01 -0600 Message-ID: Subject: Re: [PATCH v2] board: kontron: increase the CONFIG_SYS_MALLOC_F_LEN To: Sean Anderson Cc: Heiko Thiery , Heinrich Schuchardt , Tom Rini , Stefano Babic , Fabio Estevam , Peng Fan , U-Boot Mailing List 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 Hi Sean, On Wed, 23 Mar 2022 at 12:33, Sean Anderson wrote: > > On 3/23/22 2:26 PM, Heiko Thiery wrote: > > Hi Simon, > > > > Am Mi., 23. M=C3=A4rz 2022 um 19:04 Uhr schrieb Simon Glass : > >> > >> Hi Heinrich, > >> > >> On Tue, 22 Mar 2022 at 03:25, Heinrich Schuchardt = wrote: > >>> > >>> On 3/21/22 15:26, Heiko Thiery wrote: > >>>> It was observed that enabling additional DM modules the configured > >>>> malloc value is not sufficient. So lets increase the value. > >>>> > >>>> Signed-off-by: Heiko Thiery > >>>> --- > >>>> v2: > >>>> - add a more proper commit message to explan why the value was in= creased > >>>> > >>>> configs/kontron_pitx_imx8m_defconfig | 1 + > >>>> 1 file changed, 1 insertion(+) > >>>> > >>>> diff --git a/configs/kontron_pitx_imx8m_defconfig b/configs/kontron_= pitx_imx8m_defconfig > >>>> index 76430213e3..30c3586937 100644 > >>>> --- a/configs/kontron_pitx_imx8m_defconfig > >>>> +++ b/configs/kontron_pitx_imx8m_defconfig > >>>> @@ -2,6 +2,7 @@ CONFIG_ARM=3Dy > >>>> CONFIG_ARCH_IMX8M=3Dy > >>>> CONFIG_SYS_TEXT_BASE=3D0x40200000 > >>>> CONFIG_SYS_MALLOC_LEN=3D0x600000 > >>>> +CONFIG_SYS_MALLOC_F_LEN=3D0x10000 > >>> > >>> @Heiko > >>> Should we really adjust this on board level? Won't we have the same > >>> problem on all imx8m boards? > >>> > >>> Why don't you change the default for all i.mx8 boards in /Kconfig? > >>> > >>> @Tom, @Simon > >>> Shouldn't we replace the default of 0x400 by 0x2000 generally? > >> > >> I don't think that is a good idea. That is a lot of memory! Many > >> platforms don't need that much. > >> > >> I wonder what is driving this large amount. Is it pinctrl? > > > > The increase comes from the introduction of a clock driver for the > > imx8mq platform. > > Yes, the problem is that CCF creates a udevice+clk+private data for > every clock. This runs about 150-200 bytes per clock on a 64-bit > platform. In addition, many physical clocks are modeled as several > logical clocks plus a composite. This means a platform with maybe > 20-30 physical clocks can easily allocate 10k-20k to create > the clock tree. With the new DM tag support we could move uncommon fields in struct udevice to tags, such as parent_plat_, uclass_plat_, driver_data, uclass_priv_, parent_priv_, dma_offset. It would add a small amount of code but save data. We could call this DM_TINY_DATA and It might save 64 bytes per device. Also the #ifdef CONFIG_DEVRES should use CONFIG_IS_ENABLED(DEVRES) so that devres_head is not included in SPL. Regards, Simon