diff mbox

[U-Boot,v3,05/10] sandbox: use CONFIG_VAL(SYS_MALLOC_F_LEN) to distinguish malloc pool size before relocation

Message ID 1500889799-26589-1-git-send-email-andy.yan@rock-chips.com
State Accepted
Commit 1fc50d727ff2ced736e58925ae4a1a815b87f0d2
Delegated to: Philipp Tomsich
Headers show

Commit Message

Andy Yan July 24, 2017, 9:49 a.m. UTC
From: Andy Yan <andyshrk@gmail.com>

SPL and normal u-boot stage use different malloc pool size
configuration before relocation, so use CONFIG_VAL(SYS_MALLOC_F_LEN)
to fit different boot stage.

Signed-off-by: Andy Yan <andyshrk@gmail.com>

Changes in v3:
- use CONFIG_VAL(), which suggested by Simon

Changes in v2: None

 arch/sandbox/cpu/start.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Philipp Tomsich July 24, 2017, 10:42 a.m. UTC | #1
> From: Andy Yan <andyshrk@gmail.com>
> 
> SPL and normal u-boot stage use different malloc pool size
> configuration before relocation, so use CONFIG_VAL(SYS_MALLOC_F_LEN)
> to fit different boot stage.
> 
> Signed-off-by: Andy Yan <andyshrk@gmail.com>
> 
> Changes in v3:
> - use CONFIG_VAL(), which suggested by Simon
> 
> Changes in v2: None
> 
>  arch/sandbox/cpu/start.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Philipp Tomsich July 27, 2017, 10:52 a.m. UTC | #2
> From: Andy Yan <andyshrk@gmail.com>
> 
> SPL and normal u-boot stage use different malloc pool size
> configuration before relocation, so use CONFIG_VAL(SYS_MALLOC_F_LEN)
> to fit different boot stage.
> 
> Signed-off-by: Andy Yan <andyshrk@gmail.com>
> 
> Changes in v3:
> - use CONFIG_VAL(), which suggested by Simon
> 
> Changes in v2: None
> 
>  arch/sandbox/cpu/start.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
> 

Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Philipp Tomsich July 27, 2017, 12:44 p.m. UTC | #3
> From: Andy Yan <andyshrk@gmail.com>
> 
> SPL and normal u-boot stage use different malloc pool size
> configuration before relocation, so use CONFIG_VAL(SYS_MALLOC_F_LEN)
> to fit different boot stage.
> 
> Signed-off-by: Andy Yan <andyshrk@gmail.com>
> 
> Changes in v3:
> - use CONFIG_VAL(), which suggested by Simon
> 
> Changes in v2: None
> 
>  arch/sandbox/cpu/start.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
> 

Applied to u-boot-rockchip, thanks!
diff mbox

Patch

diff --git a/arch/sandbox/cpu/start.c b/arch/sandbox/cpu/start.c
index f605d4d..00742fd 100644
--- a/arch/sandbox/cpu/start.c
+++ b/arch/sandbox/cpu/start.c
@@ -310,7 +310,7 @@  int main(int argc, char *argv[])
 
 	memset(&data, '\0', sizeof(data));
 	gd = &data;
-#ifdef CONFIG_SYS_MALLOC_F_LEN
+#if CONFIG_VAL(SYS_MALLOC_F_LEN)
 	gd->malloc_base = CONFIG_MALLOC_F_ADDR;
 #endif
 	setup_ram_buf(state);