fdt_support: Check for bank size before updating memory node
PATCH 1/1 fdt_support: Check for bank size before updating memory node
In case if one of the bank that is passed is of size zero, then u-boot will be updating memory node with a bank of size zero. There is not need to update memory node if size is zero, so check for bank size before updating.
--- common/fdt_support.c | 3 +++ 1 file changed, 3 insertions(+)
common/fdt_support.c +3 -0
@@ -401,6 +401,9 @@ static int fdt_pack_reg(const void *fdt, void *buf, u64 *address, u64 *size,char *p = buf;for (i =0 ; i < n; i++) { +if (size[i] ==0 ) +continue ; +if (address_cells ==2 ) *(fdt64_t *)p =cpu_to_fdt64 (address[i]);else
Signature · 1 line
2.1.4
PATCH 1/1 fdt_support: Check for bank size before updating memory node
Quoted 3 lines · Lokesh Vutla
In case if one of the bank that is passed is of size zero, then u-boot will be updating memory node with a bank of size zero. There is not need to update memory node if size is zero, so check for bank size before
is not.
Quoted 12 lines
updating.
Signed-off-by Lokesh Vutla <[email protected]>--- common/fdt_support.c | 3 +++ 1 file changed, 3 insertions(+)common/fdt_support.c +0
-0
common/fdt_support.c static int fdt_pack_reg(const void *fdt, void *buf, u64 *address, u64 *size, · line 409
Quoted 9 lines
common/fdt_support.c +3
-0@@ -401,6 +401,9 @@ static int fdt_pack_reg(const void *fdt, void *buf, u64 *address, u64 *size,char *p = buf;for (i =0 ; i < n; i++) { +if (size[i] ==0 ) +continue ; +if (address_cells ==2 ) *(fdt64_t *)p =cpu_to_fdt64 (address[i]);else
So I suggested something along these lines a long while ago as part of how to fix the problem of DT has correct (and larger than U-Boot can see) memory size, so I like the change. But it's a "big" behavior change that we (I) need to note in the release notes at least. When I looked last things were either setting a 0 size or a correct looking size, but I bet we'll still see a few things drop out wrt incorrect (too small) memory size being passed. I wonder what the best list(s) would be to let everyone know about this would be...
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20151022/9c8303c6/attachment.sig>
PATCH 1/1 fdt_support: Check for bank size before updating memory node
Quoted 7 lines · Tom Rini
Quoted 3 lines · Lokesh Vutla
In case if one of the bank that is passed is of size zero, then u-boot will be updating memory node with a bank of size zero. There is not need to update memory node if size is zero, so check for bank size before
is not.
Oops. will correct it in v2.
Quoted 15 lines
Quoted 15 lines
updating.
Signed-off-by Lokesh Vutla <[email protected]>--- common/fdt_support.c | 3 +++ 1 file changed, 3 insertions(+)common/fdt_support.c +0
-0@@ -401,6 +401,9 @@ static int fdt_pack_reg(const void *fdt, void *buf, u64 *address, u64 *size,char *p = buf;
Quoted 16 lines
common/fdt_support.c static int fdt_pack_reg(const void *fdt, void *buf, u64 *address, u64 *size, · line 409
Quoted 7 lines
common/fdt_support.c +3
-0for (i =0 ; i < n; i++) { +if (size[i] ==0 ) +continue ; +if (address_cells ==2 ) *(fdt64_t *)p =cpu_to_fdt64 (address[i]);else So I suggested something along these lines a long while ago as part of how to fix the problem of DT has correct (and larger than U-Boot can see) memory size, so I like the change. But it's a "big" behavior change that we (I) need to note in the release notes at least. When I looked last things were either setting a 0 size or a correct looking size, but I bet we'll still see a few things drop out wrt incorrect (too small) memory size being passed. I wonder what the best list(s) would be to let everyone know about this would be...
Shall I take this as your Reviewed-by ? Not sure about how to let everyone know about this. Please let me know to whom all I have to cc for posting v2 of this patch.
Thanks and regards,
Lokesh
Quoted 1 line
PATCH 1/1 fdt_support: Check for bank size before updating memory node
Quoted 44 lines · Lokesh Vutla
Quoted 7 lines · Tom Rini
Quoted 3 lines · Lokesh Vutla
In case if one of the bank that is passed is of size zero, then u-boot will be updating memory node with a bank of size zero. There is not need to update memory node if size is zero, so check for bank size before
is not.
Oops. will correct it in v2.
Quoted 15 lines
Quoted 15 lines
updating.
Signed-off-by Lokesh Vutla <[email protected]>--- common/fdt_support.c | 3 +++ 1 file changed, 3 insertions(+)common/fdt_support.c +0
-0@@ -401,6 +401,9 @@ static int fdt_pack_reg(const void *fdt, void *buf, u64 *address, u64 *size,char *p = buf;Quoted 16 lines
common/fdt_support.c static int fdt_pack_reg(const void *fdt, void *buf, u64 *address, u64 *size, · line 409
Quoted 7 lines
common/fdt_support.c +3
-0for (i =0 ; i < n; i++) { +if (size[i] ==0 ) +continue ; +if (address_cells ==2 ) *(fdt64_t *)p =cpu_to_fdt64 (address[i]);else So I suggested something along these lines a long while ago as part of how to fix the problem of DT has correct (and larger than U-Boot can see) memory size, so I like the change. But it's a "big" behavior change that we (I) need to note in the release notes at least. When I looked last things were either setting a 0 size or a correct looking size, but I bet we'll still see a few things drop out wrt incorrect (too small) memory size being passed. I wonder what the best list(s) would be to let everyone know about this would be...
Quoted 3 lines
Shall I take this as your Reviewed-by ? Not sure about how to let everyone know about this. Please let me know to whom all I have to cc for posting v2 of this patch.
Yeah, that counts as a reviewed by. Once I merge this I'll go poke lkml/lakml/linuxppc-dev at least.
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20151023/97dbf40a/attachment.sig>