Skip to contentSkip to conversation

test/py: test_efi_fit: Update #size-cells to 1

PATCH Superseded Bin Meng 2 participants 3 messages Jun 28, 2020 – Jun 29, 2020

lore
Share & tools
lore

Bin Meng

author
#0 lore raw

PATCH v2 1/1 test/py: test_efi_fit: Update #size-cells to 1

From: Bin Meng <[email protected]>

test_efi_fit tests fail on RISC-V currently. This is due to the RISC-V arch_fixup_fdt() checks the #size-cells of the root node in order to correctly fix up the reserved memory node.

Per the DT binding, the /reserved-memory node requires both <#address-cells> and <#size-cells> and they should use the same values as the root node. For the root node, it's not very useful if <#size-cells> is zero.

Update #size-cells to 1 so tests can pass.

---

Changes in v2:
- Update the reset node's <reg> property to contain a size

 test/py/tests/test_efi_fit.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
test/py/tests/test_efi_fit.py +2 -2
index beaf4a3..06fb151 100644
@@ -106,14 +106,14 @@ FDT_DATA = '''
 
 / {
     #address-cells = <1>;
-    #size-cells = <0>;
+    #size-cells = <1>;
 
     model = "%(sys-arch)s %(fdt_type)s EFI FIT Boot Test";
     compatible = "%(sys-arch)s";
 
     reset at 0 {
         compatible = "%(sys-arch)s,reset";
-        reg = <0>;
+        reg = <0 4>;
     };
 };
 '''
Signature · 1 line
2.7.4
#1 lore raw

PATCH v2 1/1 test/py: test_efi_fit: Update #size-cells to 1

Quoted 10 lines · Bin Meng

From: Bin Meng <[email protected]>

test_efi_fit tests fail on RISC-V currently. This is due to the RISC-V arch_fixup_fdt() checks the #size-cells of the root node in order to correctly fix up the reserved memory node.

Per the DT binding, the /reserved-memory node requires both <#address-cells> and <#size-cells> and they should use the same values as the root node. For the root node, it's not very useful if <#size-cells> is zero.

The text you refer to is Linux's Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt

Will you also fix the underlying problem that the /reserved-memory node does not provide its own #address-cells, #size-cells?

Quoted 20 lines

Update #size-cells to 1 so tests can pass.

---

Changes in v2:
- Update the reset node's <reg> property to contain a size

 test/py/tests/test_efi_fit.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
test/py/tests/test_efi_fit.py +0 -0
index beaf4a3..06fb151 100644
@@ -106,14 +106,14 @@ FDT_DATA = '''
 
 / {
     #address-cells = <1>;

test/py/tests/test_efi_fit.py FDT_DATA = ''' · line 116

Quoted 10 lines
test/py/tests/test_efi_fit.py +2 -2
-    #size-cells = <0>;
+    #size-cells = <1>;
 
     model = "%(sys-arch)s %(fdt_type)s EFI FIT Boot Test";
     compatible = "%(sys-arch)s";
 
     reset at 0 {
         compatible = "%(sys-arch)s,reset";
-        reg = <0>;
+        reg = <0 4>;

This reg property is not used by any driver. I think it was only added to avoid a dtc warning.

Quoted 4 lines
test/py/tests/test_efi_fit.py +0 -0
     };
 };
 '''
author
#2 lore raw

PATCH v2 1/1 test/py: test_efi_fit: Update #size-cells to 1

Hi Heinrich,

Quoted 13 lines · Heinrich Schuchardt
Quoted 10 lines · Bin Meng

From: Bin Meng <[email protected]>

test_efi_fit tests fail on RISC-V currently. This is due to the RISC-V arch_fixup_fdt() checks the #size-cells of the root node in order to correctly fix up the reserved memory node.

Per the DT binding, the /reserved-memory node requires both <#address-cells> and <#size-cells> and they should use the same values as the root node. For the root node, it's not very useful if <#size-cells> is zero.

Quoted 5 lines

The text you refer to is Linux's Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt

Will you also fix the underlying problem that the /reserved-memory node does not provide its own #address-cells, #size-cells?

There is no underlying problem. The /reserved-memory fix-up codes will copy whatever is from root node's #address-cells, #size-cells to it.

Quoted 35 lines
Quoted 21 lines

Update #size-cells to 1 so tests can pass.

---

Changes in v2:
- Update the reset node's <reg> property to contain a size

 test/py/tests/test_efi_fit.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
test/py/tests/test_efi_fit.py +0 -0
index beaf4a3..06fb151 100644
@@ -106,14 +106,14 @@ FDT_DATA = '''
 
 / {
     #address-cells = <1>;

test/py/tests/test_efi_fit.py FDT_DATA = ''' · line 116

Quoted 10 lines
test/py/tests/test_efi_fit.py +2 -2
-    #size-cells = <0>;
+    #size-cells = <1>;
 
     model = "%(sys-arch)s %(fdt_type)s EFI FIT Boot Test";
     compatible = "%(sys-arch)s";
 
     reset at 0 {
         compatible = "%(sys-arch)s,reset";
-        reg = <0>;
+        reg = <0 4>;

This reg property is not used by any driver. I think it was only added to avoid a dtc warning.

Quoted 1 line

Regards,
Bin