Re: [U-Boot] [PATCH 4/5] board_init.c: fix simple malloc by storing malloc_limit

2018-08-06 Thread Simon Goldschmidt
Marek Vasut  schrieb am Mo., 6. Aug. 2018, 15:19:

> On 08/05/2018 09:34 PM, Simon Goldschmidt wrote:
> > board_init_f_init_reserve() sets gd->malloc_base but does
> > not set gd->malloc_limit. This results in malloc_simple()
> > failing, so let's set this here.
> >
> > Signed-off-by: Simon Goldschmidt 
> > ---
> >
> >  common/init/board_init.c | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/common/init/board_init.c b/common/init/board_init.c
> > index 526fee35ff..a9b21a7111 100644
> > --- a/common/init/board_init.c
> > +++ b/common/init/board_init.c
> > @@ -123,6 +123,7 @@ void board_init_f_init_reserve(ulong base)
> >  #if CONFIG_VAL(SYS_MALLOC_F_LEN)
> >   /* go down one 'early malloc arena' */
> >   gd->malloc_base = base;
> > + gd->malloc_limit = CONFIG_VAL(SYS_MALLOC_F_LEN);
> >   /* next alloc will be higher by one 'early malloc arena' size */
> >   base += CONFIG_VAL(SYS_MALLOC_F_LEN);
> >  #endif
>
> +CC Simon, I'd like at least one A-B/R-B on this since this is quite
> intrusive change.
>
> This should be a separate patch from this series too.
>

Ok, after changing board_init_f() for gen5 spl to call spl_early_init(),
this should not be required for me any more. I only wanted to keep others
from running into this.

I don't rally get why this assignment is here though. Maybe it can be
removed? But I guess that's hard to tell for all boards our there...

Simon Goldschmidt
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH 4/5] board_init.c: fix simple malloc by storing malloc_limit

2018-08-06 Thread Marek Vasut
On 08/05/2018 09:34 PM, Simon Goldschmidt wrote:
> board_init_f_init_reserve() sets gd->malloc_base but does
> not set gd->malloc_limit. This results in malloc_simple()
> failing, so let's set this here.
> 
> Signed-off-by: Simon Goldschmidt 
> ---
> 
>  common/init/board_init.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/common/init/board_init.c b/common/init/board_init.c
> index 526fee35ff..a9b21a7111 100644
> --- a/common/init/board_init.c
> +++ b/common/init/board_init.c
> @@ -123,6 +123,7 @@ void board_init_f_init_reserve(ulong base)
>  #if CONFIG_VAL(SYS_MALLOC_F_LEN)
>   /* go down one 'early malloc arena' */
>   gd->malloc_base = base;
> + gd->malloc_limit = CONFIG_VAL(SYS_MALLOC_F_LEN);
>   /* next alloc will be higher by one 'early malloc arena' size */
>   base += CONFIG_VAL(SYS_MALLOC_F_LEN);
>  #endif

+CC Simon, I'd like at least one A-B/R-B on this since this is quite
intrusive change.

This should be a separate patch from this series too.

-- 
Best regards,
Marek Vasut
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot