U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] common: fix detection of SYS_MALLOC_F_LEN=0x0
@ 2023-08-01 13:33 Heinrich Schuchardt
  2023-08-01 15:14 ` Tom Rini
  2023-08-07 19:28 ` Tom Rini
  0 siblings, 2 replies; 3+ messages in thread
From: Heinrich Schuchardt @ 2023-08-01 13:33 UTC (permalink / raw)
  To: Tom Rini; +Cc: Simon Glass, Pali Rohár, u-boot, Heinrich Schuchardt

CONFIG_$(SPL_TPL_)SYS_MALLOC_F_LEN is defined as hex. If set to zero
manually, .config contains '0x0' and not '0' as value.

The default value for CONFIG_SPL_SYS_MALLOC_F_LEN should not be set to 0
but to 0x0 if CONFIG_SPL_FRAMEWORK=n to match a manually set value.

Fixes: c0126bd862a0 ("spl: Support bootstage, log, hash and early malloc in TPL")
Fixes: b61694705217 ("SPL: Do not enable SPL_SYS_MALLOC_SIMPLE without SPL_FRAMEWORK by default")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
---
 Kconfig         | 2 +-
 common/Makefile | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Kconfig b/Kconfig
index 70efb41cc6..91170bf8d2 100644
--- a/Kconfig
+++ b/Kconfig
@@ -298,7 +298,7 @@ config SYS_MALLOC_LEN
 config SPL_SYS_MALLOC_F_LEN
 	hex "Size of malloc() pool in SPL"
 	depends on SYS_MALLOC_F && SPL
-	default 0 if !SPL_FRAMEWORK
+	default 0x0 if !SPL_FRAMEWORK
 	default 0x2800 if RCAR_GEN3
 	default 0x2000 if IMX8MQ
 	default SYS_MALLOC_F_LEN
diff --git a/common/Makefile b/common/Makefile
index c87bb2e78b..f5c3d90f06 100644
--- a/common/Makefile
+++ b/common/Makefile
@@ -79,7 +79,7 @@ endif # CONFIG_SPL_BUILD
 obj-$(CONFIG_CROS_EC) += cros_ec.o
 obj-y += dlmalloc.o
 ifdef CONFIG_SYS_MALLOC_F
-ifneq ($(CONFIG_$(SPL_TPL_)SYS_MALLOC_F_LEN),0)
+ifneq ($(CONFIG_$(SPL_TPL_)SYS_MALLOC_F_LEN),0x0)
 obj-y += malloc_simple.o
 endif
 endif
-- 
2.40.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-08-07 19:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-01 13:33 [PATCH 1/1] common: fix detection of SYS_MALLOC_F_LEN=0x0 Heinrich Schuchardt
2023-08-01 15:14 ` Tom Rini
2023-08-07 19:28 ` Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox