From patchwork Tue Feb 2 12:59:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Delaunay X-Patchwork-Id: 1434655 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=foss.st.com header.i=@foss.st.com header.a=rsa-sha256 header.s=selector1 header.b=MUIK+Bn2; 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 RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DVQ306P8yz9t0k for ; Wed, 3 Feb 2021 00:02:52 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4893B82667; Tue, 2 Feb 2021 14:02:31 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=foss.st.com 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=foss.st.com header.i=@foss.st.com header.b="MUIK+Bn2"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 417D68268D; Tue, 2 Feb 2021 14:00:23 +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.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mx07-00178001.pphosted.com (mx08-00178001.pphosted.com [91.207.212.93]) (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 47E6982663 for ; Tue, 2 Feb 2021 14:00:00 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=foss.st.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=patrick.delaunay@foss.st.com Received: from pps.filterd (m0046661.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 112Cuqa5000760; Tue, 2 Feb 2021 13:59:43 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=selector1; bh=DpV6gWkHpRPkbxh31Ng098h5IsiKcVQ1PuiepGkDhsg=; b=MUIK+Bn2PtHv/5HHfbtnZJhiG6zKDYlSjiox5o5Qs2Y5ZpTeBF7tUxhtuSRsYqh8FPQq d7MNCtJpUllZY/82YAtqyY3NV6R1ujaKPp+3uAyBwpaIbp1F18AlDtzqewybj+EH9LBP T0Zs90Eo1SL2q8JtN/i9MVFoR014lW7+8S+O+fG22qngyn+lzRdrHUecvdd4PKLwGvAa 81x5RMmVO9lBZMwBgo9px8IAJAuNLxuZxzN7yX4RqMklHHzq+iMxvg7YDRlWjm3NAS+F JEE+c1Ydv5jB5dWM/zuL4dRcvFqwfIBC/TyxBHhYNc8C1lJknzdSVDxGiFYQYW7hD2sX 1A== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 36e7x0sqya-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 02 Feb 2021 13:59:43 +0100 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 9010910002A; Tue, 2 Feb 2021 13:59:36 +0100 (CET) Received: from Webmail-eu.st.com (sfhdag2node3.st.com [10.75.127.6]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 71AEB234482; Tue, 2 Feb 2021 13:59:36 +0100 (CET) Received: from localhost (10.75.127.44) by SFHDAG2NODE3.st.com (10.75.127.6) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Tue, 2 Feb 2021 13:59:36 +0100 From: Patrick Delaunay To: CC: Patrick Delaunay , AKASHI Takahiro , Adam Ford , Alexey Brodkin , Andre Przywara , Angelo Dureghello , Ashok Reddy Soma , Aswath Govindraju , Atish Patra , Bin Meng , Daniel Schwierzeck , Eugeniy Paltsev , Huan Wang , Lokesh Vutla , Marcin Juszkiewicz , Marek Szyprowski , Marek Vasut , Mario Six , Masahiro Yamada , Max Filippov , Michal Simek , Naoki Hayama , Nobuhiro Iwamatsu , Philippe Reynes , Reuben Dowle , Rick Chen , Sam Protsenko , Simon Glass , Stefan Roese , Thomas Chou , Wolfgang Denk , , U-Boot STM32 Subject: [PATCH 1/5] lmb: move CONFIG_LMB in Kconfig Date: Tue, 2 Feb 2021 13:59:08 +0100 Message-ID: <20210202135729.1.Ifa5a03d3733bf4f5245de4d0e07f433c4889b955@changeid> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210202125913.13597-1-patrick.delaunay@foss.st.com> References: <20210202125913.13597-1-patrick.delaunay@foss.st.com> MIME-Version: 1.0 X-Originating-IP: [10.75.127.44] X-ClientProxiedBy: SFHDAG3NODE1.st.com (10.75.127.7) To SFHDAG2NODE3.st.com (10.75.127.6) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.369, 18.0.737 definitions=2021-02-02_06:2021-02-02, 2021-02-02 signatures=0 X-Mailman-Approved-At: Tue, 02 Feb 2021 14:02:19 +0100 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.102.3 at phobos.denx.de X-Virus-Status: Clean Migrate CONFIG_LMB in Kconfig. Signed-off-by: Patrick Delaunay --- arch/arc/include/asm/config.h | 2 -- arch/arm/include/asm/config.h | 1 - arch/m68k/include/asm/config.h | 1 - arch/microblaze/include/asm/config.h | 2 -- arch/mips/include/asm/config.h | 1 - arch/nds32/include/asm/config.h | 1 - arch/powerpc/include/asm/config.h | 1 - arch/riscv/include/asm/config.h | 1 - arch/sh/include/asm/config.h | 2 -- arch/x86/include/asm/config.h | 1 - arch/xtensa/include/asm/config.h | 2 -- include/configs/10m50_devboard.h | 5 ----- include/configs/3c120_devboard.h | 5 ----- include/configs/sandbox.h | 2 -- include/configs/x86-common.h | 2 -- include/image.h | 2 +- lib/Kconfig | 7 +++++++ scripts/config_whitelist.txt | 1 - 18 files changed, 8 insertions(+), 31 deletions(-) diff --git a/arch/arc/include/asm/config.h b/arch/arc/include/asm/config.h index d88c361488..46e94be141 100644 --- a/arch/arc/include/asm/config.h +++ b/arch/arc/include/asm/config.h @@ -8,6 +8,4 @@ #define CONFIG_SYS_BOOT_RAMDISK_HIGH -#define CONFIG_LMB - #endif /*__ASM_ARC_CONFIG_H_ */ diff --git a/arch/arm/include/asm/config.h b/arch/arm/include/asm/config.h index bf692ce279..14860d89b6 100644 --- a/arch/arm/include/asm/config.h +++ b/arch/arm/include/asm/config.h @@ -6,7 +6,6 @@ #ifndef _ASM_CONFIG_H_ #define _ASM_CONFIG_H_ -#define CONFIG_LMB #define CONFIG_SYS_BOOT_RAMDISK_HIGH #if defined(CONFIG_ARCH_LS1021A) || \ diff --git a/arch/m68k/include/asm/config.h b/arch/m68k/include/asm/config.h index 7ea443673a..221eb93d58 100644 --- a/arch/m68k/include/asm/config.h +++ b/arch/m68k/include/asm/config.h @@ -6,7 +6,6 @@ #ifndef _ASM_CONFIG_H_ #define _ASM_CONFIG_H_ -#define CONFIG_LMB #define CONFIG_SYS_BOOT_RAMDISK_HIGH #endif diff --git a/arch/microblaze/include/asm/config.h b/arch/microblaze/include/asm/config.h index 3ae71b3e01..221eb93d58 100644 --- a/arch/microblaze/include/asm/config.h +++ b/arch/microblaze/include/asm/config.h @@ -6,8 +6,6 @@ #ifndef _ASM_CONFIG_H_ #define _ASM_CONFIG_H_ -#define CONFIG_LMB - #define CONFIG_SYS_BOOT_RAMDISK_HIGH #endif diff --git a/arch/mips/include/asm/config.h b/arch/mips/include/asm/config.h index 7ea443673a..221eb93d58 100644 --- a/arch/mips/include/asm/config.h +++ b/arch/mips/include/asm/config.h @@ -6,7 +6,6 @@ #ifndef _ASM_CONFIG_H_ #define _ASM_CONFIG_H_ -#define CONFIG_LMB #define CONFIG_SYS_BOOT_RAMDISK_HIGH #endif diff --git a/arch/nds32/include/asm/config.h b/arch/nds32/include/asm/config.h index 8964a58f27..6c1cbce7ef 100644 --- a/arch/nds32/include/asm/config.h +++ b/arch/nds32/include/asm/config.h @@ -7,6 +7,5 @@ #ifndef _ASM_CONFIG_H_ #define _ASM_CONFIG_H_ -#define CONFIG_LMB #endif diff --git a/arch/powerpc/include/asm/config.h b/arch/powerpc/include/asm/config.h index c9c9964630..99b410dc9b 100644 --- a/arch/powerpc/include/asm/config.h +++ b/arch/powerpc/include/asm/config.h @@ -18,7 +18,6 @@ #define HWCONFIG_BUFFER_SIZE 256 #endif -#define CONFIG_LMB #define CONFIG_SYS_BOOT_RAMDISK_HIGH #ifndef CONFIG_MAX_MEM_MAPPED diff --git a/arch/riscv/include/asm/config.h b/arch/riscv/include/asm/config.h index 156cb94dc0..d911007537 100644 --- a/arch/riscv/include/asm/config.h +++ b/arch/riscv/include/asm/config.h @@ -7,7 +7,6 @@ #ifndef _ASM_CONFIG_H_ #define _ASM_CONFIG_H_ -#define CONFIG_LMB #define CONFIG_SYS_BOOT_RAMDISK_HIGH #endif diff --git a/arch/sh/include/asm/config.h b/arch/sh/include/asm/config.h index e1cd322152..406156dff5 100644 --- a/arch/sh/include/asm/config.h +++ b/arch/sh/include/asm/config.h @@ -8,8 +8,6 @@ #include -#define CONFIG_LMB - /* Timer */ #define CONFIG_SYS_TIMER_COUNTS_DOWN #define CONFIG_SYS_TIMER_COUNTER (TMU_BASE + 0xc) /* TCNT0 */ diff --git a/arch/x86/include/asm/config.h b/arch/x86/include/asm/config.h index 7ea443673a..221eb93d58 100644 --- a/arch/x86/include/asm/config.h +++ b/arch/x86/include/asm/config.h @@ -6,7 +6,6 @@ #ifndef _ASM_CONFIG_H_ #define _ASM_CONFIG_H_ -#define CONFIG_LMB #define CONFIG_SYS_BOOT_RAMDISK_HIGH #endif diff --git a/arch/xtensa/include/asm/config.h b/arch/xtensa/include/asm/config.h index 5a95fc93f7..a1096ab196 100644 --- a/arch/xtensa/include/asm/config.h +++ b/arch/xtensa/include/asm/config.h @@ -9,8 +9,6 @@ #include -#define CONFIG_LMB - /* * Make boot parameters available in the MMUv2 virtual memory layout by * restricting used physical memory to the first 128MB. diff --git a/include/configs/10m50_devboard.h b/include/configs/10m50_devboard.h index 768b4a6dfc..3ffc744928 100644 --- a/include/configs/10m50_devboard.h +++ b/include/configs/10m50_devboard.h @@ -34,11 +34,6 @@ */ #define CONFIG_BOOTP_BOOTFILESIZE -/* - * FDT options - */ -#define CONFIG_LMB - /* * MEMORY ORGANIZATION * -Monitor at top of sdram. diff --git a/include/configs/3c120_devboard.h b/include/configs/3c120_devboard.h index 30bbd716b2..3f065ff315 100644 --- a/include/configs/3c120_devboard.h +++ b/include/configs/3c120_devboard.h @@ -34,11 +34,6 @@ */ #define CONFIG_BOOTP_BOOTFILESIZE -/* - * FDT options - */ -#define CONFIG_LMB - /* * MEMORY ORGANIZATION * -Monitor at top of sdram. diff --git a/include/configs/sandbox.h b/include/configs/sandbox.h index e0708fe573..6abb78611a 100644 --- a/include/configs/sandbox.h +++ b/include/configs/sandbox.h @@ -22,8 +22,6 @@ #define CONFIG_SYS_TIMER_RATE 1000000 #endif -#define CONFIG_LMB - #define CONFIG_HOST_MAX_DEVICES 4 /* diff --git a/include/configs/x86-common.h b/include/configs/x86-common.h index 641ed2c5ec..f186dd6b82 100644 --- a/include/configs/x86-common.h +++ b/include/configs/x86-common.h @@ -16,8 +16,6 @@ */ #define CONFIG_PHYSMEM -#define CONFIG_LMB - #define CONFIG_SYS_BOOTM_LEN (16 << 20) /* SATA AHCI storage */ diff --git a/include/image.h b/include/image.h index 856bc3e1b2..b15ab309c3 100644 --- a/include/image.h +++ b/include/image.h @@ -431,7 +431,7 @@ typedef struct bootm_headers { #define BOOTM_STATE_OS_GO (0x00000400) int state; -#ifdef CONFIG_LMB +#if defined(CONFIG_LMB) && !defined(USE_HOSTCC) struct lmb lmb; /* for memory mgmt */ #endif } bootm_headers_t; diff --git a/lib/Kconfig b/lib/Kconfig index b35a71ac36..43bd7190b9 100644 --- a/lib/Kconfig +++ b/lib/Kconfig @@ -699,6 +699,13 @@ config LIB_ELF Support basic elf loading/validating functions. This supports for 32 bit and 64 bit versions. +config LMB + bool "Enable the logical memory blocks library (lmb)" + default y if ARC || ARM || M68K || MICROBLAZE || MIPS || NDS32 || \ + NIOS2 || PPC || RISCV || SANDBOX || SH || X86 || XTENSA + help + Support the library logical memory blocks. + endmenu config PHANDLE_CHECK_SEQ diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt index c6a8312495..0b46256016 100644 --- a/scripts/config_whitelist.txt +++ b/scripts/config_whitelist.txt @@ -964,7 +964,6 @@ CONFIG_LEGACY_BOOTCMD_ENV CONFIG_LINUX CONFIG_LINUX_RESET_VEC CONFIG_LITTLETON_LCD -CONFIG_LMB CONFIG_LMS283GF05 CONFIG_LOADADDR CONFIG_LOADCMD From patchwork Tue Feb 2 12:59:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Delaunay X-Patchwork-Id: 1434653 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=foss.st.com header.i=@foss.st.com header.a=rsa-sha256 header.s=selector1 header.b=lWtqlVkk; 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 RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DVQ083HrRz9sVq for ; Wed, 3 Feb 2021 00:00:24 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A76CC82673; Tue, 2 Feb 2021 13:59:56 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=foss.st.com 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=foss.st.com header.i=@foss.st.com header.b="lWtqlVkk"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E864A801D8; Tue, 2 Feb 2021 13:59:49 +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.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mx07-00178001.pphosted.com (mx08-00178001.pphosted.com [91.207.212.93]) (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 91D76801D8 for ; Tue, 2 Feb 2021 13:59:44 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=foss.st.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=patrick.delaunay@foss.st.com Received: from pps.filterd (m0046661.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 112CuquJ000755; Tue, 2 Feb 2021 13:59:38 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=selector1; bh=SRB/8cTsnOH0ejykrtzyaX31KJbgz5MMjMq9jzbbu2E=; b=lWtqlVkk8LFEqHDYaRAW3/TPBWyzUfLjjSljtG2X8mylMZWDbev3y4cIAFvxNggk35XT ajbEjApcq+0s8Khjl8pwPOm3/hyZ8DFnaGAuuruSu8Ptz9Nb65Ooj4CAjOW59e5DrXzm svIYoDKy/a/EcOv5xAnlFH1W82V/7H1mlxMr4LOc8ObLxRF8fVnvTltM1py1XXLp+8+/ S8eeAApOVI2v+lljylRvxAhzs3hLRjXSOtVMjtoghhizLunit8UUVcMwOlxJ6qAfJwD2 mmH0VQpU9eBkZ121Z8bCuIE8LvP/u77fxltDHeRT0j6XsIMJPPDzaGalxvmN/6Kz7Zvr KQ== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 36e7x0sqxv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 02 Feb 2021 13:59:38 +0100 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 58F75100034; Tue, 2 Feb 2021 13:59:37 +0100 (CET) Received: from Webmail-eu.st.com (sfhdag2node3.st.com [10.75.127.6]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 47364234483; Tue, 2 Feb 2021 13:59:37 +0100 (CET) Received: from localhost (10.75.127.47) by SFHDAG2NODE3.st.com (10.75.127.6) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Tue, 2 Feb 2021 13:59:37 +0100 From: Patrick Delaunay To: CC: Patrick Delaunay , Bin Meng , Masahiro Yamada , =?utf-8?q?Pali_Roh=C3=A1r?= , Simon Glass , Stefan Roese , Tero Kristo , U-Boot STM32 Subject: [PATCH 2/5] lmb: remove lmb_region.size Date: Tue, 2 Feb 2021 13:59:09 +0100 Message-ID: <20210202135729.2.Ied3d7fa502a6796d8839ee9f4a048b276f16c073@changeid> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210202125913.13597-1-patrick.delaunay@foss.st.com> References: <20210202125913.13597-1-patrick.delaunay@foss.st.com> MIME-Version: 1.0 X-Originating-IP: [10.75.127.47] X-ClientProxiedBy: SFHDAG2NODE2.st.com (10.75.127.5) To SFHDAG2NODE3.st.com (10.75.127.6) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.369, 18.0.737 definitions=2021-02-02_06:2021-02-02, 2021-02-02 signatures=0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.102.3 at phobos.denx.de X-Virus-Status: Clean Remove the unused field size of struct lmb_region as it is initialized to 0 and never used after in lmb library. See Linux kernel commit 4734b594c6ca ("memblock: Remove memblock_type.size and add memblock.memory_size instead") Signed-off-by: Patrick Delaunay --- include/lmb.h | 1 - lib/lmb.c | 6 ------ 2 files changed, 7 deletions(-) diff --git a/include/lmb.h b/include/lmb.h index e9f19b16ea..a3247544c1 100644 --- a/include/lmb.h +++ b/include/lmb.h @@ -21,7 +21,6 @@ struct lmb_property { struct lmb_region { unsigned long cnt; - phys_size_t size; struct lmb_property region[MAX_LMB_REGIONS+1]; }; diff --git a/lib/lmb.c b/lib/lmb.c index d126f8dc04..5cf419f439 100644 --- a/lib/lmb.c +++ b/lib/lmb.c @@ -20,8 +20,6 @@ void lmb_dump_all_force(struct lmb *lmb) printf("lmb_dump_all:\n"); printf(" memory.cnt = 0x%lx\n", lmb->memory.cnt); - printf(" memory.size = 0x%llx\n", - (unsigned long long)lmb->memory.size); for (i = 0; i < lmb->memory.cnt; i++) { printf(" memory.reg[0x%lx].base = 0x%llx\n", i, (unsigned long long)lmb->memory.region[i].base); @@ -30,8 +28,6 @@ void lmb_dump_all_force(struct lmb *lmb) } printf("\n reserved.cnt = 0x%lx\n", lmb->reserved.cnt); - printf(" reserved.size = 0x%llx\n", - (unsigned long long)lmb->reserved.size); for (i = 0; i < lmb->reserved.cnt; i++) { printf(" reserved.reg[0x%lx].base = 0x%llx\n", i, (unsigned long long)lmb->reserved.region[i].base); @@ -100,9 +96,7 @@ static void lmb_coalesce_regions(struct lmb_region *rgn, unsigned long r1, void lmb_init(struct lmb *lmb) { lmb->memory.cnt = 0; - lmb->memory.size = 0; lmb->reserved.cnt = 0; - lmb->reserved.size = 0; } static void lmb_reserve_common(struct lmb *lmb, void *fdt_blob) From patchwork Tue Feb 2 12:59:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Delaunay X-Patchwork-Id: 1434652 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=foss.st.com header.i=@foss.st.com header.a=rsa-sha256 header.s=selector1 header.b=SBcJF5Wr; 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 RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DVPzv188Jz9t0k for ; Wed, 3 Feb 2021 00:00:10 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id CC12082361; Tue, 2 Feb 2021 13:59:51 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=foss.st.com 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=foss.st.com header.i=@foss.st.com header.b="SBcJF5Wr"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5F24E82631; Tue, 2 Feb 2021 13:59:49 +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.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mx07-00178001.pphosted.com (mx08-00178001.pphosted.com [91.207.212.93]) (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 9C1AD82361 for ; Tue, 2 Feb 2021 13:59:44 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=foss.st.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=patrick.delaunay@foss.st.com Received: from pps.filterd (m0046661.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 112Cungq000727; Tue, 2 Feb 2021 13:59:38 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=selector1; bh=+XTFKqKXUMaaz/VPG5JCMGp01yF0LYxc0cbgArhciYc=; b=SBcJF5Wr8n9WI5DFe8GETXzp6p5729y8wBjtba9RL1PEC7lKMTrq0m5O04oIYbVNZM17 LwP+igNfH2btUOqXTlJ7s71jI/b+a/9eZMVu7Uv8ghPsQkHGvC2knU0d5sFJa1iK84QP n0ViG9JxsSAz8m3Jd5KQUDv23NUJE/D2LRHeGEQM8/OzaFfFf9qRJHxsPZpNoryXScIR zQ71PRRTXOx48pEBXtLKggUZNClwofK2i20B/oBGZubf2mnuW/lBTAM71pI85DDeKdB3 5JaxLEr1Wa2JO51BaHqijrcogX97Wz3WlEkQ8Udr5jCPusqCzuiCsWASyjMOQ+b2L+/n lQ== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 36e7x0sqxy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 02 Feb 2021 13:59:38 +0100 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 310ED100038; Tue, 2 Feb 2021 13:59:38 +0100 (CET) Received: from Webmail-eu.st.com (sfhdag2node3.st.com [10.75.127.6]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 26AC1234483; Tue, 2 Feb 2021 13:59:38 +0100 (CET) Received: from localhost (10.75.127.45) by SFHDAG2NODE3.st.com (10.75.127.6) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Tue, 2 Feb 2021 13:59:37 +0100 From: Patrick Delaunay To: CC: Patrick Delaunay , Masahiro Yamada , =?utf-8?q?Pali_Roh=C3=A1r?= , Simon Glass , Stefan Roese , Tero Kristo , U-Boot STM32 Subject: [PATCH 3/5] lmb: Move lmb property arrays in struct lmb Date: Tue, 2 Feb 2021 13:59:10 +0100 Message-ID: <20210202135729.3.Ib388bce4b48489235edd7596c8d0bfd139560f4f@changeid> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210202125913.13597-1-patrick.delaunay@foss.st.com> References: <20210202125913.13597-1-patrick.delaunay@foss.st.com> MIME-Version: 1.0 X-Originating-IP: [10.75.127.45] X-ClientProxiedBy: SFHDAG3NODE1.st.com (10.75.127.7) To SFHDAG2NODE3.st.com (10.75.127.6) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.369, 18.0.737 definitions=2021-02-02_06:2021-02-02, 2021-02-02 signatures=0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.102.3 at phobos.denx.de X-Virus-Status: Clean Move lmb property arrays to struct lmb and manage the array size in a the new element 'max' of struct lmb_region. This modification allows to update its size independently in the next patch. see Linux kernel commit bf23c51f1f49 ("memblock: Move memblock arrays to static storage in memblock.c and make their size a variable") Signed-off-by: Patrick Delaunay --- include/lmb.h | 31 ++++++++++++++++++++++++++++++- lib/lmb.c | 8 +++++++- 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/include/lmb.h b/include/lmb.h index a3247544c1..df543028d5 100644 --- a/include/lmb.h +++ b/include/lmb.h @@ -14,19 +14,48 @@ #define MAX_LMB_REGIONS 8 +/** + * struct lmb_property - Description of one region. + * + * @base: Base address of the region. + * @size: Size of the region + */ struct lmb_property { phys_addr_t base; phys_size_t size; }; +/** + * struct lmb_region - Description of a set of region. + * + * @cnt: Number of regions. + * @max: Size of the region array, max value of cnt. + * @region: Address of the region properties array + */ struct lmb_region { unsigned long cnt; - struct lmb_property region[MAX_LMB_REGIONS+1]; + unsigned long max; + struct lmb_property *region; }; +/** + * struct lmb - Logical memory block handle. + * + * Clients provide storage for Logical memory block (lmb) handles. + * The content of the structure is managed by the lmb library. + * A lmb struct is initialized by lmb_init() functions. + * The lmb struct is passed to all other lmb APIs. + * + * @memory: Description of memory regions. + * @reserved: Description of reserved regions. + * @memory_regions: Array of the memory regions (statically allocated) + * @reserved_regions: Array of the reserved regions (statically allocated) + */ struct lmb { struct lmb_region memory; struct lmb_region reserved; + struct lmb_property memory_regions[MAX_LMB_REGIONS + 1]; + struct lmb_property reserved_regions[MAX_LMB_REGIONS + 1]; }; extern void lmb_init(struct lmb *lmb); diff --git a/lib/lmb.c b/lib/lmb.c index 5cf419f439..c97be0a064 100644 --- a/lib/lmb.c +++ b/lib/lmb.c @@ -95,7 +95,13 @@ static void lmb_coalesce_regions(struct lmb_region *rgn, unsigned long r1, void lmb_init(struct lmb *lmb) { + /* Hookup the initial arrays */ + lmb->memory.region = lmb->memory_regions; + lmb->memory.max = ARRAY_SIZE(lmb->memory_regions) - 1; lmb->memory.cnt = 0; + + lmb->reserved.region = lmb->reserved_regions; + lmb->reserved.max = ARRAY_SIZE(lmb->reserved_regions) - 1; lmb->reserved.cnt = 0; } @@ -179,7 +185,7 @@ static long lmb_add_region(struct lmb_region *rgn, phys_addr_t base, phys_size_t if (coalesced) return coalesced; - if (rgn->cnt >= MAX_LMB_REGIONS) + if (rgn->cnt >= rgn->max) return -1; /* Couldn't coalesce the LMB, so add it to the sorted table. */ From patchwork Tue Feb 2 12:59:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Delaunay X-Patchwork-Id: 1434654 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=foss.st.com header.i=@foss.st.com header.a=rsa-sha256 header.s=selector1 header.b=lXivdupD; 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 RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DVQ0L6hWWz9sWL for ; Wed, 3 Feb 2021 00:00:34 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id CEFD482657; Tue, 2 Feb 2021 14:00:02 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=foss.st.com 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=foss.st.com header.i=@foss.st.com header.b="lXivdupD"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D5E0C82653; Tue, 2 Feb 2021 13:59:53 +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.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mx07-00178001.pphosted.com (mx07-00178001.pphosted.com [185.132.182.106]) (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 D429982652 for ; Tue, 2 Feb 2021 13:59:48 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=foss.st.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=patrick.delaunay@foss.st.com Received: from pps.filterd (m0241204.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 112CuLbI022290; Tue, 2 Feb 2021 13:59:39 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=selector1; bh=/kUQn7GVWpXh3gbeFTPBDKGCJnYbCZGAyLqZMYIQw1c=; b=lXivdupDyUyxmOPW8GFGXbndLQTqOFTjK2xZ7FX/tH9VHZzPBe7IxASo51PWQ9Sr1CIQ b/8hRQUmyvpYCUXBGdU8ZwjZvquwRWwf2kKgpOOOczqF86P24DpT2aLnlrZnhtqrNcJw w+/YZ5fznT63Zc+fgi7psYYPDyB5isb3WRcwbA8ZdhakYaAeYpAsNj7jEyoNefIoe742 NcsE1yW+lIka6PUVRkczkhmmgU9Q90iafimX5n6e3qcgrivHonG/J6M6ezC5RXFNGCAY hdMLCbsCdjVtsxc0d6zizFs0I8bfKYLwx2clXB3C2sjYCu5sKqJJAbtw6tCzmvFNMaGZ 7Q== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 36ey7gttkf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 02 Feb 2021 13:59:39 +0100 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 298B3100034; Tue, 2 Feb 2021 13:59:39 +0100 (CET) Received: from Webmail-eu.st.com (sfhdag2node3.st.com [10.75.127.6]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 19873234483; Tue, 2 Feb 2021 13:59:39 +0100 (CET) Received: from localhost (10.75.127.44) by SFHDAG2NODE3.st.com (10.75.127.6) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Tue, 2 Feb 2021 13:59:38 +0100 From: Patrick Delaunay To: CC: Patrick Delaunay , Aswath Govindraju , Bin Meng , Marcin Juszkiewicz , Marek Szyprowski , Masahiro Yamada , Reuben Dowle , Simon Glass , Stefan Roese , Tero Kristo , U-Boot STM32 Subject: [PATCH 4/5] lmb: Add 2 config to define the max number of regions Date: Tue, 2 Feb 2021 13:59:11 +0100 Message-ID: <20210202135729.4.Icdf0b7e662fc65658e591ce0f692a5695f607256@changeid> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210202125913.13597-1-patrick.delaunay@foss.st.com> References: <20210202125913.13597-1-patrick.delaunay@foss.st.com> MIME-Version: 1.0 X-Originating-IP: [10.75.127.44] X-ClientProxiedBy: SFHDAG3NODE3.st.com (10.75.127.9) To SFHDAG2NODE3.st.com (10.75.127.6) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.369, 18.0.737 definitions=2021-02-02_06:2021-02-02, 2021-02-02 signatures=0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.102.3 at phobos.denx.de X-Virus-Status: Clean Add 2 configs CONFIG_LMB_MEMORY_REGIONS and CONFIG_LMB_RESERVED_REGIONS to change independently the max number of the regions in lmb library. Increase CONFIG_LMB_RESERVED_REGIONS is useful to avoid lmb errors in bootm when the number of reserved regions (not adjacent) is reached: + 1 region for relocated U-Boot + 1 region for initrd + 1 region for relocated linux device tree + reserved memory regions present in Linux device tree. The current limit of 8 regions is reached with only 5 reserved regions in DT. Signed-off-by: Patrick Delaunay --- include/lmb.h | 6 ++---- lib/Kconfig | 16 ++++++++++++++++ 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/include/lmb.h b/include/lmb.h index df543028d5..97be24ed66 100644 --- a/include/lmb.h +++ b/include/lmb.h @@ -12,8 +12,6 @@ * Copyright (C) 2001 Peter Bergner, IBM Corp. */ -#define MAX_LMB_REGIONS 8 - /** * struct lmb_property - Description of one region. * @@ -54,8 +52,8 @@ struct lmb_region { struct lmb { struct lmb_region memory; struct lmb_region reserved; - struct lmb_property memory_regions[MAX_LMB_REGIONS + 1]; - struct lmb_property reserved_regions[MAX_LMB_REGIONS + 1]; + struct lmb_property memory_regions[CONFIG_LMB_MEMORY_REGIONS + 1]; + struct lmb_property reserved_regions[CONFIG_LMB_RESERVED_REGIONS + 1]; }; extern void lmb_init(struct lmb *lmb); diff --git a/lib/Kconfig b/lib/Kconfig index 43bd7190b9..4249399b6f 100644 --- a/lib/Kconfig +++ b/lib/Kconfig @@ -706,6 +706,22 @@ config LMB help Support the library logical memory blocks. +config LMB_MEMORY_REGIONS + int "Number of memory regions in lmb lib" + depends on LMB + default 8 + help + Define the number of supported memory regions in the library logical + memory blocks. + +config LMB_RESERVED_REGIONS + int "Number of reserved regions in lmb lib" + depends on LMB + default 8 + help + Define the number of supported reserved regions in the library logical + memory blocks. + endmenu config PHANDLE_CHECK_SEQ From patchwork Tue Feb 2 12:59:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Delaunay X-Patchwork-Id: 1434651 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=foss.st.com header.i=@foss.st.com header.a=rsa-sha256 header.s=selector1 header.b=g1ZZpSJ6; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DVPzY2Gqwz9sWL for ; Tue, 2 Feb 2021 23:59:53 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8892180829; Tue, 2 Feb 2021 13:59:46 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=foss.st.com 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=foss.st.com header.i=@foss.st.com header.b="g1ZZpSJ6"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 07DD080829; Tue, 2 Feb 2021 13:59:44 +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.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mx07-00178001.pphosted.com (mx07-00178001.pphosted.com [185.132.182.106]) (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 C0D93801D8 for ; Tue, 2 Feb 2021 13:59:40 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=foss.st.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=patrick.delaunay@foss.st.com Received: from pps.filterd (m0046668.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 112CvgRW002838; Tue, 2 Feb 2021 13:59:40 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=selector1; bh=0E3VPQKe8bIMKNsC5bPhZmBq/I26a9XIL9yqF4zFYks=; b=g1ZZpSJ6zhepgpQOkZ+rjspAHv3/+9La7Xo+xAmgSXoN37h93Yr+iPoT6TTNpznmx/9z TXrgtaYQsD8uJz16XKGU55rXF9GF+2FTQyD/EOKzmDUGW95SDjuFMy/Hw+QkE+0eyZeI Ps67HYpgvXfme14TLhdlbGcar7FYuRHIBHKFu5llJEvNzJ2zMuOQxlverYZ9wRi+xj/e j1NqeCBYRH7bp5Rkjfv2A5hO4vhrjabzCGtI+qCsBvAWLzf8EE2bfvMiK+AgRHx3AWcw KRZ1ws7XZmk+hwgJQBtA2ga6uqQvFKqBhMza5BsRTbo4QK25Kx410F54anmG7hFsHq5Q eA== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 36d0frs8qs-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 02 Feb 2021 13:59:40 +0100 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id ED907100038; Tue, 2 Feb 2021 13:59:39 +0100 (CET) Received: from Webmail-eu.st.com (sfhdag2node3.st.com [10.75.127.6]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id E669F234483; Tue, 2 Feb 2021 13:59:39 +0100 (CET) Received: from localhost (10.75.127.47) by SFHDAG2NODE3.st.com (10.75.127.6) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Tue, 2 Feb 2021 13:59:39 +0100 From: Patrick Delaunay To: CC: Patrick Delaunay , Patrice Chotard , Subject: [PATCH 5/5] configs: stm32mp15: increase the number of reserved memory region in lmb Date: Tue, 2 Feb 2021 13:59:12 +0100 Message-ID: <20210202135729.5.I0fd0759810c8b211efa5597dd4333772abcde528@changeid> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210202125913.13597-1-patrick.delaunay@foss.st.com> References: <20210202125913.13597-1-patrick.delaunay@foss.st.com> MIME-Version: 1.0 X-Originating-IP: [10.75.127.47] X-ClientProxiedBy: SFHDAG3NODE1.st.com (10.75.127.7) To SFHDAG2NODE3.st.com (10.75.127.6) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.369, 18.0.737 definitions=2021-02-02_06:2021-02-02, 2021-02-02 signatures=0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.102.3 at phobos.denx.de X-Virus-Status: Clean For the latest kernel device tree the max number of reserved regions in lmb library is reached: 8 with 5 reserved regions in device tree. When a new region is added, the lmb allocation for the device tree relocation failed and boot with ramdisk failed. This patch avoid this issue by increasing the max number of supported reserved memory in lmb library. Signed-off-by: Patrick Delaunay --- configs/stm32mp15_basic_defconfig | 1 + configs/stm32mp15_trusted_defconfig | 1 + 2 files changed, 2 insertions(+) diff --git a/configs/stm32mp15_basic_defconfig b/configs/stm32mp15_basic_defconfig index d3e5775a5a..df59ef70b1 100644 --- a/configs/stm32mp15_basic_defconfig +++ b/configs/stm32mp15_basic_defconfig @@ -157,3 +157,4 @@ CONFIG_WDT=y CONFIG_WDT_STM32MP=y CONFIG_ERRNO_STR=y CONFIG_FDT_FIXUP_PARTITIONS=y +CONFIG_LMB_RESERVED_REGIONS=16 diff --git a/configs/stm32mp15_trusted_defconfig b/configs/stm32mp15_trusted_defconfig index d392b0ff2a..0078dccf66 100644 --- a/configs/stm32mp15_trusted_defconfig +++ b/configs/stm32mp15_trusted_defconfig @@ -137,3 +137,4 @@ CONFIG_WDT=y CONFIG_WDT_STM32MP=y CONFIG_ERRNO_STR=y CONFIG_FDT_FIXUP_PARTITIONS=y +CONFIG_LMB_RESERVED_REGIONS=16