diff mbox series

[v2,8/8] configs: stm32mp15: increase the number of reserved memory region in lmb

Message ID 20210310101622.v2.8.I0fd0759810c8b211efa5597dd4333772abcde528@changeid
State Accepted
Commit 0089affee275e47047be8ae9deac6ca08a5da478
Delegated to: Tom Rini
Headers show
Series lmb: Add config for the number of memory and reserved regions | expand

Commit Message

Patrick DELAUNAY March 10, 2021, 9:16 a.m. UTC
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 avoids this issue by increasing the max number of
supported reserved memory in lmb library to 16.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
---

Changes in v2:
- Add CONFIG_LMB_USE_MAX_REGIONS=n and reduce LMB_MEMORY_REGIONS
  to reduce the used size in stack

 configs/stm32mp15_basic_defconfig   | 3 +++
 configs/stm32mp15_trusted_defconfig | 3 +++
 2 files changed, 6 insertions(+)

Comments

Tom Rini April 23, 2021, 4:24 p.m. UTC | #1
On Wed, Mar 10, 2021 at 10:16:32AM +0100, Patrick Delaunay wrote:

> 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 avoids this issue by increasing the max number of
> supported reserved memory in lmb library to 16.
> 
> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/configs/stm32mp15_basic_defconfig b/configs/stm32mp15_basic_defconfig
index 1c680984b8..a290224a46 100644
--- a/configs/stm32mp15_basic_defconfig
+++ b/configs/stm32mp15_basic_defconfig
@@ -168,3 +168,6 @@  CONFIG_WDT_STM32MP=y
 CONFIG_ERRNO_STR=y
 # CONFIG_HEXDUMP is not set
 CONFIG_FDT_FIXUP_PARTITIONS=y
+# CONFIG_LMB_USE_MAX_REGIONS is not set
+CONFIG_LMB_MEMORY_REGIONS=2
+CONFIG_LMB_RESERVED_REGIONS=16
diff --git a/configs/stm32mp15_trusted_defconfig b/configs/stm32mp15_trusted_defconfig
index 107041119f..ebd4c05891 100644
--- a/configs/stm32mp15_trusted_defconfig
+++ b/configs/stm32mp15_trusted_defconfig
@@ -148,3 +148,6 @@  CONFIG_WDT_STM32MP=y
 CONFIG_ERRNO_STR=y
 # CONFIG_HEXDUMP is not set
 CONFIG_FDT_FIXUP_PARTITIONS=y
+# CONFIG_LMB_USE_MAX_REGIONS is not set
+CONFIG_LMB_MEMORY_REGIONS=2
+CONFIG_LMB_RESERVED_REGIONS=16