All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] image: fdt: check "status" of "/reserved-memory" subnodes
@ 2020-01-07  6:21 Thirupathaiah Annapureddy
  2020-01-07  8:33 ` Simon Goldschmidt
  0 siblings, 1 reply; 5+ messages in thread
From: Thirupathaiah Annapureddy @ 2020-01-07  6:21 UTC (permalink / raw)
  To: u-boot

boot_fdt_add_mem_rsv_regions() scans the subnodes of
"/reserved-memory" and adds them to reserved lmb regions.
Currently this scanning does not take into "status" property.
Even if the subnode is disabled, it gets added to the
reserved lmb regions.

This patch checks the "status" property before adding it
to reserved lmb regions.

Signed-off-by: Thirupathaiah Annapureddy <thiruan@linux.microsoft.com>
---
 common/image-fdt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/image-fdt.c b/common/image-fdt.c
index 48388488d9..cf13d655c0 100644
--- a/common/image-fdt.c
+++ b/common/image-fdt.c
@@ -122,7 +122,7 @@ void boot_fdt_add_mem_rsv_regions(struct lmb *lmb, void *fdt_blob)
 			/* check if this subnode has a reg property */
 			ret = fdt_get_resource(fdt_blob, subnode, "reg", 0,
 					       &res);
-			if (!ret) {
+			if (!ret && fdtdec_get_is_enabled(fdt_blob, subnode)) {
 				addr = res.start;
 				size = res.end - res.start + 1;
 				boot_fdt_reserve_region(lmb, addr, size);
-- 
2.24.1

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

* [PATCH] image: fdt: check "status" of "/reserved-memory" subnodes
  2020-01-07  6:21 [PATCH] image: fdt: check "status" of "/reserved-memory" subnodes Thirupathaiah Annapureddy
@ 2020-01-07  8:33 ` Simon Goldschmidt
  2020-02-04 17:09   ` Thirupathaiah Annapureddy
  0 siblings, 1 reply; 5+ messages in thread
From: Simon Goldschmidt @ 2020-01-07  8:33 UTC (permalink / raw)
  To: u-boot

On Tue, Jan 7, 2020 at 7:21 AM Thirupathaiah Annapureddy
<thiruan@linux.microsoft.com> wrote:
>
> boot_fdt_add_mem_rsv_regions() scans the subnodes of
> "/reserved-memory" and adds them to reserved lmb regions.
> Currently this scanning does not take into "status" property.
> Even if the subnode is disabled, it gets added to the
> reserved lmb regions.
>
> This patch checks the "status" property before adding it
> to reserved lmb regions.
>
> Signed-off-by: Thirupathaiah Annapureddy <thiruan@linux.microsoft.com>

Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>

> ---
>  common/image-fdt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/common/image-fdt.c b/common/image-fdt.c
> index 48388488d9..cf13d655c0 100644
> --- a/common/image-fdt.c
> +++ b/common/image-fdt.c
> @@ -122,7 +122,7 @@ void boot_fdt_add_mem_rsv_regions(struct lmb *lmb, void *fdt_blob)
>                         /* check if this subnode has a reg property */
>                         ret = fdt_get_resource(fdt_blob, subnode, "reg", 0,
>                                                &res);
> -                       if (!ret) {
> +                       if (!ret && fdtdec_get_is_enabled(fdt_blob, subnode)) {
>                                 addr = res.start;
>                                 size = res.end - res.start + 1;
>                                 boot_fdt_reserve_region(lmb, addr, size);
> --
> 2.24.1
>

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

* [PATCH] image: fdt: check "status" of "/reserved-memory" subnodes
  2020-01-07  8:33 ` Simon Goldschmidt
@ 2020-02-04 17:09   ` Thirupathaiah Annapureddy
  2020-02-05  0:16     ` Simon Glass
  0 siblings, 1 reply; 5+ messages in thread
From: Thirupathaiah Annapureddy @ 2020-02-04 17:09 UTC (permalink / raw)
  To: u-boot

Thank You Simon for the review. 

May I know what are the next steps in making forward progress on this? 

Best Regards,
Thiru

On 1/7/2020 12:33 AM, Simon Goldschmidt wrote:
> On Tue, Jan 7, 2020 at 7:21 AM Thirupathaiah Annapureddy
> <thiruan@linux.microsoft.com> wrote:
>>
>> boot_fdt_add_mem_rsv_regions() scans the subnodes of
>> "/reserved-memory" and adds them to reserved lmb regions.
>> Currently this scanning does not take into "status" property.
>> Even if the subnode is disabled, it gets added to the
>> reserved lmb regions.
>>
>> This patch checks the "status" property before adding it
>> to reserved lmb regions.
>>
>> Signed-off-by: Thirupathaiah Annapureddy <thiruan@linux.microsoft.com>
> 
> Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
> 
>> ---
>>  common/image-fdt.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/common/image-fdt.c b/common/image-fdt.c
>> index 48388488d9..cf13d655c0 100644
>> --- a/common/image-fdt.c
>> +++ b/common/image-fdt.c
>> @@ -122,7 +122,7 @@ void boot_fdt_add_mem_rsv_regions(struct lmb *lmb, void *fdt_blob)
>>                         /* check if this subnode has a reg property */
>>                         ret = fdt_get_resource(fdt_blob, subnode, "reg", 0,
>>                                                &res);
>> -                       if (!ret) {
>> +                       if (!ret && fdtdec_get_is_enabled(fdt_blob, subnode)) {
>>                                 addr = res.start;
>>                                 size = res.end - res.start + 1;
>>                                 boot_fdt_reserve_region(lmb, addr, size);
>> --
>> 2.24.1
>>

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

* [PATCH] image: fdt: check "status" of "/reserved-memory" subnodes
  2020-02-04 17:09   ` Thirupathaiah Annapureddy
@ 2020-02-05  0:16     ` Simon Glass
  2020-02-05 17:58       ` Simon Glass
  0 siblings, 1 reply; 5+ messages in thread
From: Simon Glass @ 2020-02-05  0:16 UTC (permalink / raw)
  To: u-boot

]Hi Thirupathaiah,

On Tue, 4 Feb 2020 at 10:09, Thirupathaiah Annapureddy
<thiruan@linux.microsoft.com> wrote:
>
> Thank You Simon for the review.
>
> May I know what are the next steps in making forward progress on this?

The patch is in my queue but I've had some test failures. Assuming it
is not the culprit I expect it will be applied by next week.

Regards,
Simon


>
> Best Regards,
> Thiru
>
> On 1/7/2020 12:33 AM, Simon Goldschmidt wrote:
> > On Tue, Jan 7, 2020 at 7:21 AM Thirupathaiah Annapureddy
> > <thiruan@linux.microsoft.com> wrote:
> >>
> >> boot_fdt_add_mem_rsv_regions() scans the subnodes of
> >> "/reserved-memory" and adds them to reserved lmb regions.
> >> Currently this scanning does not take into "status" property.
> >> Even if the subnode is disabled, it gets added to the
> >> reserved lmb regions.
> >>
> >> This patch checks the "status" property before adding it
> >> to reserved lmb regions.
> >>
> >> Signed-off-by: Thirupathaiah Annapureddy <thiruan@linux.microsoft.com>
> >
> > Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
> >
> >> ---
> >>  common/image-fdt.c | 2 +-
> >>  1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/common/image-fdt.c b/common/image-fdt.c
> >> index 48388488d9..cf13d655c0 100644
> >> --- a/common/image-fdt.c
> >> +++ b/common/image-fdt.c
> >> @@ -122,7 +122,7 @@ void boot_fdt_add_mem_rsv_regions(struct lmb *lmb, void *fdt_blob)
> >>                         /* check if this subnode has a reg property */
> >>                         ret = fdt_get_resource(fdt_blob, subnode, "reg", 0,
> >>                                                &res);
> >> -                       if (!ret) {
> >> +                       if (!ret && fdtdec_get_is_enabled(fdt_blob, subnode)) {
> >>                                 addr = res.start;
> >>                                 size = res.end - res.start + 1;
> >>                                 boot_fdt_reserve_region(lmb, addr, size);
> >> --
> >> 2.24.1
> >>

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

* [PATCH] image: fdt: check "status" of "/reserved-memory" subnodes
  2020-02-05  0:16     ` Simon Glass
@ 2020-02-05 17:58       ` Simon Glass
  0 siblings, 0 replies; 5+ messages in thread
From: Simon Glass @ 2020-02-05 17:58 UTC (permalink / raw)
  To: u-boot

On Tue, 4 Feb 2020 at 17:16, Simon Glass <sjg@chromium.org> wrote:
>
> ]Hi Thirupathaiah,
>
> On Tue, 4 Feb 2020 at 10:09, Thirupathaiah Annapureddy
> <thiruan@linux.microsoft.com> wrote:
> >
> > Thank You Simon for the review.
> >
> > May I know what are the next steps in making forward progress on this?
>
> The patch is in my queue but I've had some test failures. Assuming it
> is not the culprit I expect it will be applied by next week.

Applied to u-boot-dm, thanks!

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

end of thread, other threads:[~2020-02-05 17:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-07  6:21 [PATCH] image: fdt: check "status" of "/reserved-memory" subnodes Thirupathaiah Annapureddy
2020-01-07  8:33 ` Simon Goldschmidt
2020-02-04 17:09   ` Thirupathaiah Annapureddy
2020-02-05  0:16     ` Simon Glass
2020-02-05 17:58       ` Simon Glass

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.