xen/arm: bootfdt: Use proper default for #address-cells and #size-cells
PATCH 1/1 xen/arm: bootfdt: Use proper default for #address-cells and #size-cells
Per the device-tree specific [1], when the property #address-cells and #size-cells are not present, the default value should be resp. 1 and 2.
[1] https://www.devicetree.org/downloads/devicetree-specification-v0.1-20160524.pdf
---
This was discovered debugging DT generated by GRUB on ACPI-only platform. I am not aware of any DT relying on that for now, but it would still be nice to be compliant with the spec and avoid surprise.
--- xen/arch/arm/bootfdt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
xen/arch/arm/bootfdt.c +2 -2
@@ -109,8 +109,8 @@ int __init device_tree_for_each_node(const void *fdt,continue ; } - as = depth >0 ? address_cells[depth-1 ] :0 ; - ss = depth >0 ? size_cells[depth-1 ] :0 ; + as = depth >0 ? address_cells[depth-1 ] :DT_ROOT_NODE_ADDR_CELLS_DEFAULT ; + ss = depth >0 ? size_cells[depth-1 ] :DT_ROOT_NODE_SIZE_CELLS_DEFAULT ; address_cells[depth] =device_tree_get_u32 (fdt, node,"#address-cells" , as);
Signature · 7 lines
2.11.0 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 7 lines · Julien Grall
Per the device-tree specific [1], when the property #address-cells and #size-cells are not present, the default value should be resp. 1 and 2.
[1] https://www.devicetree.org/downloads/devicetree-specification-v0.1-20160524.pdf
Signed-off-by Julien Grall <[email protected]>
Quoted 28 lines
---
This was discovered debugging DT generated by GRUB on ACPI-only platform. I am not aware of any DT relying on that for now, but it would still be nice to be compliant with the spec and avoid surprise.
--- xen/arch/arm/bootfdt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)xen/arch/arm/bootfdt.c +2
-2@@ -109,8 +109,8 @@ int __init device_tree_for_each_node(const void *fdt,continue ; } - as = depth >0 ? address_cells[depth-1 ] :0 ; - ss = depth >0 ? size_cells[depth-1 ] :0 ; + as = depth >0 ? address_cells[depth-1 ] :DT_ROOT_NODE_ADDR_CELLS_DEFAULT ; + ss = depth >0 ? size_cells[depth-1 ] :DT_ROOT_NODE_SIZE_CELLS_DEFAULT ; address_cells[depth] =device_tree_get_u32 (fdt, node,"#address-cells" , as);Signature · 1 line
2.11.0
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Hi,
Quoted 10 lines · Stefano Stabellini
Quoted 7 lines · Julien Grall
Per the device-tree specific [1], when the property #address-cells and #size-cells are not present, the default value should be resp. 1 and 2.
[1] https://www.devicetree.org/downloads/devicetree-specification-v0.1-20160524.pdf
Signed-off-by Julien Grall <[email protected]>
This was acked but not applied to staging. Can you do it please?
Cheers,
Quoted 30 lines
Quoted 30 lines
---
This was discovered debugging DT generated by GRUB on ACPI-only platform. I am not aware of any DT relying on that for now, but it would still be nice to be compliant with the spec and avoid surprise.
--- xen/arch/arm/bootfdt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)xen/arch/arm/bootfdt.c +2
-2@@ -109,8 +109,8 @@ int __init device_tree_for_each_node(const void *fdt,continue ; } - as = depth >0 ? address_cells[depth-1 ] :0 ; - ss = depth >0 ? size_cells[depth-1 ] :0 ; + as = depth >0 ? address_cells[depth-1 ] :DT_ROOT_NODE_ADDR_CELLS_DEFAULT ; + ss = depth >0 ? size_cells[depth-1 ] :DT_ROOT_NODE_SIZE_CELLS_DEFAULT ; address_cells[depth] =device_tree_get_u32 (fdt, node,"#address-cells" , as);Signature · 1 line
2.11.0
Signature · 6 lines
Julien Grall _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 8 lines · Julien Grall
Hi,
Quoted 5 lines · Stefano Stabellini
Quoted 4 lines · Julien Grall
Per the device-tree specific [1], when the property #address-cells and #size-cells are not present, the default value should be resp. 1 and 2.
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
[1]
https://www.devicetree.org/downloads/devicetree-specification-v0.1-20160524.pdfSigned-off-by Julien Grall <[email protected]>This was acked but not applied to staging. Can you do it please?
It was in my arm-next branch together with a couple of patches from Andre. I committed all three to staging.
Quoted 24 lines
Quoted 24 lines
Quoted 24 lines
---
This was discovered debugging DT generated by GRUB on ACPI-only platform. I am not aware of any DT relying on that for now, but it would still be nice to be compliant with the spec and avoid surprise.
--- xen/arch/arm/bootfdt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)xen/arch/arm/bootfdt.c +1
-1@@ -109,8 +109,8 @@ int __init device_tree_for_each_node(const void *fdt,continue ; } - as = depth >0 ? address_cells[depth-1 ] :0 ; - ss = depth >0 ? size_cells[depth-1 ] :0 ; + as = depth >0 ? address_cells[depth-1 ] :DT_ROOT_NODE_ADDR_CELLS_DEFAULT ;
Quoted 12 lines
Quoted 8 lines
Quoted 8 lines
xen/arch/arm/bootfdt.c +1
-0+ ss = depth >0 ? size_cells[depth-1 ] :DT_ROOT_NODE_SIZE_CELLS_DEFAULT ; address_cells[depth] = device_tree_get_u32(fdt, node, "#address-cells",as);
Signature · 1 line
2.11.0Signature · 1 line
Julien Grall
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel