From patchwork Wed Jan 25 23:08:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rini X-Patchwork-Id: 1731929 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.a=rsa-sha256 header.s=google header.b=cWLSRgxA; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4P2KJm2pKSz23gM for ; Thu, 26 Jan 2023 10:08:38 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2DAC084954; Thu, 26 Jan 2023 00:08:31 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com 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=konsulko.com header.i=@konsulko.com header.b="cWLSRgxA"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 442318091A; Thu, 26 Jan 2023 00:08:29 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-vk1-xa2f.google.com (mail-vk1-xa2f.google.com [IPv6:2607:f8b0:4864:20::a2f]) (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 8256D84954 for ; Thu, 26 Jan 2023 00:08:26 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-vk1-xa2f.google.com with SMTP id l129so137343vkh.6 for ; Wed, 25 Jan 2023 15:08:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=+gd9SNYXxZjXWPxhg+vNxgxV2Kt3i1TkfXYjOjXkGA4=; b=cWLSRgxAcaY8Dv/K7qfnRfjDA+FAAMsCTmDqdfozO+Vijo7y7Vsmqyuuqu73yFg86q HVZNKnb98/FFsCOmM6lSQpnSIxXTTjrJbMW7gGnguvEdMxJ0jYFviPl6WFlwTTkqh3aD aIeAWXBgoyxfFaP4s83yo3igdL5IK/nEfcUps= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=+gd9SNYXxZjXWPxhg+vNxgxV2Kt3i1TkfXYjOjXkGA4=; b=pzG5mpnQ1agnFXdxkmpWOKLxNEw9z+LN8yXtgA/jCBuK2brCNB2wJk6EXfn3WfSL55 4lLrFgi/eoRTTL0VCZqWuAVPpGOjW2Rv4dF0sjV+g6i3IGWInYDnpnixoDS0/p8n4wUZ nS9fbukypawpbzsv1hmgcbJxXPhAJQ/iaIGJ4SEmuWwXOZZHrrtss2oO70XXdcHin6QG x9RvIHyDatEiNE9lqJwigTuTvcV4eZ/wHSkCJxFZhdJFiKU1D18zmEsJoE/HyflUhoLO 8dV80nB4Pgr/5N81n2XMEtoJiKYG7E9JD/Ian8L6paLq6pQ2Tyf0pXQaVjFHMmR3fCdZ 00JA== X-Gm-Message-State: AFqh2kor4c8eRtD2w+yiOF4KaQomoBF6NI1Bo3YTX5heJcH8gL6GDNEO hDuoI0AZ6VWzZ/WcKUxcK+vFWu3oslcbk8whxME= X-Google-Smtp-Source: AMrXdXtnskDTgnITrcKTO1JCRaFGnNbWeEuAhkd2iiBn1cX7Ly4cGVsQnVakbwGzGchS/HfQsBvJzQ== X-Received: by 2002:ac5:c99a:0:b0:3e1:7f6e:31c3 with SMTP id e26-20020ac5c99a000000b003e17f6e31c3mr20221401vkm.9.1674688104817; Wed, 25 Jan 2023 15:08:24 -0800 (PST) Received: from bill-the-cat.lan (2603-6081-7b00-6400-3a56-04fb-7eea-5810.res6.spectrum.com. [2603:6081:7b00:6400:3a56:4fb:7eea:5810]) by smtp.gmail.com with ESMTPSA id 198-20020a3705cf000000b006fed58fc1a3sm4239828qkf.119.2023.01.25.15.08.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Jan 2023 15:08:24 -0800 (PST) From: Tom Rini To: u-boot@lists.denx.de Subject: [PATCH] lmb: Default to not-LMB_USE_MAX_REGIONS Date: Wed, 25 Jan 2023 18:08:23 -0500 Message-Id: <20230125230823.1567778-1-trini@konsulko.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 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 The LMB code allows for picking a hard limit on the number of regions it can know of, or to dynamically allocate these regions. The reason for this choice is to allow for the compiler to perform a size optimization in the common case. This optimization however, is very small, ranging from 196 bytes to 15 bytes saved, or in some cases, being larger. Now that we also have more regions covered by LMB (in order to protect various parts of our self at run time), the default of 8 is also much easier to hit and leads to non-obvious error messages (which imply that an area is protected, not that we're out of areas to add to the list). Switch to the dynamic use as the default. Signed-off-by: Tom Rini --- configs/a3y17lte_defconfig | 1 - configs/a5y17lte_defconfig | 1 - configs/a7y17lte_defconfig | 1 - configs/dragonboard845c_defconfig | 1 - configs/mt7981_emmc_rfb_defconfig | 1 - configs/mt7981_rfb_defconfig | 1 - configs/mt7981_sd_rfb_defconfig | 1 - configs/mt7986_rfb_defconfig | 1 - configs/mt7986a_bpir3_emmc_defconfig | 1 - configs/mt7986a_bpir3_sd_defconfig | 1 - configs/qcs404evb_defconfig | 1 - configs/starqltechn_defconfig | 1 - lib/Kconfig | 1 - 13 files changed, 13 deletions(-) diff --git a/configs/a3y17lte_defconfig b/configs/a3y17lte_defconfig index 124fb8d47617..0215c5f234bb 100644 --- a/configs/a3y17lte_defconfig +++ b/configs/a3y17lte_defconfig @@ -24,4 +24,3 @@ CONFIG_SYS_BOOTM_LEN=0x2000000 CONFIG_CMD_GPIO=y CONFIG_CMD_I2C=y CONFIG_DM_I2C_GPIO=y -CONFIG_LMB_MAX_REGIONS=64 diff --git a/configs/a5y17lte_defconfig b/configs/a5y17lte_defconfig index ffb0b3f474a6..d1cd97baf512 100644 --- a/configs/a5y17lte_defconfig +++ b/configs/a5y17lte_defconfig @@ -24,4 +24,3 @@ CONFIG_SYS_BOOTM_LEN=0x2000000 CONFIG_CMD_GPIO=y CONFIG_CMD_I2C=y CONFIG_DM_I2C_GPIO=y -CONFIG_LMB_MAX_REGIONS=64 diff --git a/configs/a7y17lte_defconfig b/configs/a7y17lte_defconfig index 8c1229d8d5ec..bef2d0945aec 100644 --- a/configs/a7y17lte_defconfig +++ b/configs/a7y17lte_defconfig @@ -24,4 +24,3 @@ CONFIG_SYS_BOOTM_LEN=0x2000000 CONFIG_CMD_GPIO=y CONFIG_CMD_I2C=y CONFIG_DM_I2C_GPIO=y -CONFIG_LMB_MAX_REGIONS=64 diff --git a/configs/dragonboard845c_defconfig b/configs/dragonboard845c_defconfig index a69d82761a8d..cef82f56108e 100644 --- a/configs/dragonboard845c_defconfig +++ b/configs/dragonboard845c_defconfig @@ -26,4 +26,3 @@ CONFIG_DM_PMIC=y CONFIG_PMIC_QCOM=y CONFIG_MSM_GENI_SERIAL=y CONFIG_SPMI_MSM=y -CONFIG_LMB_MAX_REGIONS=64 diff --git a/configs/mt7981_emmc_rfb_defconfig b/configs/mt7981_emmc_rfb_defconfig index b3b37b6e5ed4..4832a2264395 100644 --- a/configs/mt7981_emmc_rfb_defconfig +++ b/configs/mt7981_emmc_rfb_defconfig @@ -62,4 +62,3 @@ CONFIG_MTK_SERIAL=y CONFIG_FAT_WRITE=y CONFIG_HEXDUMP=y # CONFIG_EFI_LOADER is not set -CONFIG_LMB_MAX_REGIONS=64 diff --git a/configs/mt7981_rfb_defconfig b/configs/mt7981_rfb_defconfig index b7ffb4dfa74d..c3975278871e 100644 --- a/configs/mt7981_rfb_defconfig +++ b/configs/mt7981_rfb_defconfig @@ -64,4 +64,3 @@ CONFIG_SPI=y CONFIG_DM_SPI=y CONFIG_MTK_SPIM=y CONFIG_HEXDUMP=y -CONFIG_LMB_MAX_REGIONS=64 diff --git a/configs/mt7981_sd_rfb_defconfig b/configs/mt7981_sd_rfb_defconfig index 85be9bbc5030..17592dc22b9a 100644 --- a/configs/mt7981_sd_rfb_defconfig +++ b/configs/mt7981_sd_rfb_defconfig @@ -62,4 +62,3 @@ CONFIG_MTK_SERIAL=y CONFIG_FAT_WRITE=y CONFIG_HEXDUMP=y # CONFIG_EFI_LOADER is not set -CONFIG_LMB_MAX_REGIONS=64 diff --git a/configs/mt7986_rfb_defconfig b/configs/mt7986_rfb_defconfig index ac91c93efb42..1363f9dc6d0b 100644 --- a/configs/mt7986_rfb_defconfig +++ b/configs/mt7986_rfb_defconfig @@ -64,4 +64,3 @@ CONFIG_SPI=y CONFIG_DM_SPI=y CONFIG_MTK_SPIM=y CONFIG_HEXDUMP=y -CONFIG_LMB_MAX_REGIONS=64 diff --git a/configs/mt7986a_bpir3_emmc_defconfig b/configs/mt7986a_bpir3_emmc_defconfig index 2d4876f299f4..354159df9b2e 100644 --- a/configs/mt7986a_bpir3_emmc_defconfig +++ b/configs/mt7986a_bpir3_emmc_defconfig @@ -62,4 +62,3 @@ CONFIG_MTK_SERIAL=y CONFIG_FAT_WRITE=y CONFIG_HEXDUMP=y # CONFIG_EFI_LOADER is not set -CONFIG_LMB_MAX_REGIONS=64 diff --git a/configs/mt7986a_bpir3_sd_defconfig b/configs/mt7986a_bpir3_sd_defconfig index 08edfe7ac409..db7ef98d807b 100644 --- a/configs/mt7986a_bpir3_sd_defconfig +++ b/configs/mt7986a_bpir3_sd_defconfig @@ -62,4 +62,3 @@ CONFIG_MTK_SERIAL=y CONFIG_FAT_WRITE=y CONFIG_HEXDUMP=y # CONFIG_EFI_LOADER is not set -CONFIG_LMB_MAX_REGIONS=64 diff --git a/configs/qcs404evb_defconfig b/configs/qcs404evb_defconfig index dae155141152..d3608cae9f90 100644 --- a/configs/qcs404evb_defconfig +++ b/configs/qcs404evb_defconfig @@ -51,4 +51,3 @@ CONFIG_USB_XHCI_DWC3=y CONFIG_USB_DWC3=y CONFIG_USB_DWC3_GENERIC=y CONFIG_USB_STORAGE=y -CONFIG_LMB_MAX_REGIONS=64 diff --git a/configs/starqltechn_defconfig b/configs/starqltechn_defconfig index 7a64f2a7a088..81fd7b22676e 100644 --- a/configs/starqltechn_defconfig +++ b/configs/starqltechn_defconfig @@ -33,4 +33,3 @@ CONFIG_VIDEO=y CONFIG_SYS_WHITE_ON_BLACK=y CONFIG_VIDEO_SIMPLE=y CONFIG_VIDEO_DT_SIMPLEFB=y -CONFIG_LMB_MAX_REGIONS=64 diff --git a/lib/Kconfig b/lib/Kconfig index 549bd3577851..59e4304afd1a 100644 --- a/lib/Kconfig +++ b/lib/Kconfig @@ -1028,7 +1028,6 @@ config LMB config LMB_USE_MAX_REGIONS bool "Use a common number of memory and reserved regions in lmb lib" depends on LMB - default y help Define the number of supported memory regions in the library logical memory blocks.