From: Simon Glass Date: Mon, 19 Oct 2015 12:49:58 +0000 (-0600) Subject: board_init_f_mem(): Don't create an unused early malloc() area X-Git-Tag: v2016.01-rc1~172 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=518f0bccc49e783ae6aa68af9cb3b3dcd912f2cf;p=u-boot board_init_f_mem(): Don't create an unused early malloc() area Change the #ifdef so that the early malloc() area is not set up in SPL if CONFIG_SYS_SPL_MALLOC_START is defined. In that case it would never actually be used, and just chews up stack space. Signed-off-by: Simon Glass Tested-by: Masahiro Yamada --- diff --git a/common/init/board_init.c b/common/init/board_init.c index 1c6126d8ce..e74b63b8a8 100644 --- a/common/init/board_init.c +++ b/common/init/board_init.c @@ -50,7 +50,8 @@ ulong board_init_f_mem(ulong top) #endif arch_setup_gd(gd_ptr); -#if defined(CONFIG_SYS_MALLOC_F) +#if defined(CONFIG_SYS_MALLOC_F) && \ + (!defined(CONFIG_SPL_BUILD) || !defined(CONFIG_SYS_SPL_MALLOC_START)) top -= CONFIG_SYS_MALLOC_F_LEN; gd->malloc_base = top; #endif