* [U-Boot] [PATCH] spl: Correct call to spl_common_init() with SPL_STACK_R_MALLOC_SIMPLE_LEN
@ 2017-03-20 18:19 Tom Rini
2017-03-21 2:39 ` Lokesh Vutla
2017-03-21 11:15 ` [U-Boot] [PATCHv2] " Tom Rini
0 siblings, 2 replies; 4+ messages in thread
From: Tom Rini @ 2017-03-20 18:19 UTC (permalink / raw)
To: u-boot
Calls to IS_ENABLED() on a non-y/n option will always be false, even
when set. We can correct this by adding a new bool value that is set
based on the conditions required for SPL_STACK_R_MALLOC_SIMPLE_LEN to be
set instead.
Fixes: 340f418acd11 ("spl: Add spl_early_init()")
Reported-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
---
common/spl/spl.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/common/spl/spl.c b/common/spl/spl.c
index d98b9fcb9ade..91180d4b476b 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -227,10 +227,11 @@ int spl_early_init(void)
int spl_init(void)
{
int ret;
+ bool setup_malloc = !(IS_ENABLED(CONFIG_SPL_STACK_R) &&
+ IS_ENABLED(SPL_SYS_MALLOC_SIMPLE));
if (!(gd->flags & GD_FLG_SPL_EARLY_INIT)) {
- ret = spl_common_init(
- !IS_ENABLED(CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN));
+ ret = spl_common_init(setup_malloc);
if (ret)
return ret;
}
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH] spl: Correct call to spl_common_init() with SPL_STACK_R_MALLOC_SIMPLE_LEN
2017-03-20 18:19 [U-Boot] [PATCH] spl: Correct call to spl_common_init() with SPL_STACK_R_MALLOC_SIMPLE_LEN Tom Rini
@ 2017-03-21 2:39 ` Lokesh Vutla
2017-03-21 11:15 ` [U-Boot] [PATCHv2] " Tom Rini
1 sibling, 0 replies; 4+ messages in thread
From: Lokesh Vutla @ 2017-03-21 2:39 UTC (permalink / raw)
To: u-boot
On Monday 20 March 2017 11:49 PM, Tom Rini wrote:
> Calls to IS_ENABLED() on a non-y/n option will always be false, even
> when set. We can correct this by adding a new bool value that is set
> based on the conditions required for SPL_STACK_R_MALLOC_SIMPLE_LEN to be
> set instead.
>
> Fixes: 340f418acd11 ("spl: Add spl_early_init()")
> Reported-by: Lokesh Vutla <lokeshvutla@ti.com>
> Signed-off-by: Tom Rini <trini@konsulko.com>
> ---
> common/spl/spl.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/common/spl/spl.c b/common/spl/spl.c
> index d98b9fcb9ade..91180d4b476b 100644
> --- a/common/spl/spl.c
> +++ b/common/spl/spl.c
> @@ -227,10 +227,11 @@ int spl_early_init(void)
> int spl_init(void)
> {
> int ret;
> + bool setup_malloc = !(IS_ENABLED(CONFIG_SPL_STACK_R) &&
> + IS_ENABLED(SPL_SYS_MALLOC_SIMPLE));
This should be CONFIG_SPL_SYS_MALLOC_SIMPLE. With this change it works fine.
Thanks and regards,
Lokesh
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [PATCHv2] spl: Correct call to spl_common_init() with SPL_STACK_R_MALLOC_SIMPLE_LEN
2017-03-20 18:19 [U-Boot] [PATCH] spl: Correct call to spl_common_init() with SPL_STACK_R_MALLOC_SIMPLE_LEN Tom Rini
2017-03-21 2:39 ` Lokesh Vutla
@ 2017-03-21 11:15 ` Tom Rini
2017-03-21 18:09 ` Tom Rini
1 sibling, 1 reply; 4+ messages in thread
From: Tom Rini @ 2017-03-21 11:15 UTC (permalink / raw)
To: u-boot
Calls to IS_ENABLED() on a non-y/n option will always be false, even
when set. We can correct this by adding a new bool value that is set
based on the conditions required for SPL_STACK_R_MALLOC_SIMPLE_LEN to be
set instead.
Fixes: 340f418acd11 ("spl: Add spl_early_init()")
Reported-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
---
Changes in v2:
- Fix thinko pointed out by Lokesh
---
common/spl/spl.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/common/spl/spl.c b/common/spl/spl.c
index d98b9fcb9ade..0d1e08245f6a 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -227,10 +227,11 @@ int spl_early_init(void)
int spl_init(void)
{
int ret;
+ bool setup_malloc = !(IS_ENABLED(CONFIG_SPL_STACK_R) &&
+ IS_ENABLED(CONFIG_SPL_SYS_MALLOC_SIMPLE));
if (!(gd->flags & GD_FLG_SPL_EARLY_INIT)) {
- ret = spl_common_init(
- !IS_ENABLED(CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN));
+ ret = spl_common_init(setup_malloc);
if (ret)
return ret;
}
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [U-Boot] [PATCHv2] spl: Correct call to spl_common_init() with SPL_STACK_R_MALLOC_SIMPLE_LEN
2017-03-21 11:15 ` [U-Boot] [PATCHv2] " Tom Rini
@ 2017-03-21 18:09 ` Tom Rini
0 siblings, 0 replies; 4+ messages in thread
From: Tom Rini @ 2017-03-21 18:09 UTC (permalink / raw)
To: u-boot
On Tue, Mar 21, 2017 at 07:15:01AM -0400, Tom Rini wrote:
> Calls to IS_ENABLED() on a non-y/n option will always be false, even
> when set. We can correct this by adding a new bool value that is set
> based on the conditions required for SPL_STACK_R_MALLOC_SIMPLE_LEN to be
> set instead.
>
> Fixes: 340f418acd11 ("spl: Add spl_early_init()")
> Reported-by: Lokesh Vutla <lokeshvutla@ti.com>
> Signed-off-by: Tom Rini <trini@konsulko.com>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170321/2056e9ff/attachment.sig>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-03-21 18:09 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-20 18:19 [U-Boot] [PATCH] spl: Correct call to spl_common_init() with SPL_STACK_R_MALLOC_SIMPLE_LEN Tom Rini
2017-03-21 2:39 ` Lokesh Vutla
2017-03-21 11:15 ` [U-Boot] [PATCHv2] " Tom Rini
2017-03-21 18:09 ` Tom Rini
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.