Skip to contentSkip to conversation

riscv: dts: fu540-c000: Add "status" property to cpu node

PATCH In review Bin Meng 3 participants 8 messages Jul 5, 2019 – Jul 28, 2019

Subsystems (4)
lore
Share & tools
lore

Bin Meng

author
#0 lore raw

PATCH 1/1 riscv: dts: fu540-c000: Add "status" property to cpu node

Per device tree spec, the "status" property property shall be present for nodes representing CPUs in a SMP configuration. This property is currently missing in cpu 1/2/3/4 node in the fu540-c000.dtsi.

---

 arch/riscv/boot/dts/sifive/fu540-c000.dtsi | 4 ++++
 1 file changed, 4 insertions(+)
arch/riscv/boot/dts/sifive/fu540-c000.dtsi +4 -0
index 4098349..0fff2a4 100644
@@ -53,6 +53,7 @@
 			mmu-type = "riscv,sv39";
 			reg = <1>;
 			riscv,isa = "rv64imafdc";
+			status = "okay";
 			tlb-split;
 			cpu1_intc: interrupt-controller {
 				#interrupt-cells = <1>;
@@ -77,6 +78,7 @@
 			mmu-type = "riscv,sv39";
 			reg = <2>;
 			riscv,isa = "rv64imafdc";
+			status = "okay";
 			tlb-split;
 			cpu2_intc: interrupt-controller {
 				#interrupt-cells = <1>;
@@ -101,6 +103,7 @@
 			mmu-type = "riscv,sv39";
 			reg = <3>;
 			riscv,isa = "rv64imafdc";
+			status = "okay";
 			tlb-split;
 			cpu3_intc: interrupt-controller {
 				#interrupt-cells = <1>;
@@ -125,6 +128,7 @@
 			mmu-type = "riscv,sv39";
 			reg = <4>;
 			riscv,isa = "rv64imafdc";
+			status = "okay";
 			tlb-split;
 			cpu4_intc: interrupt-controller {
 				#interrupt-cells = <1>;
Signature · 1 line
2.7.4
#1 lore raw
Quoted 13 lines

-----Original Message-----
From: linux-riscv <[email protected]> On Behalf Of Bin Meng
Sent: Friday, July 5, 2019 9:23 AM
To: linux-riscv <[email protected]>; devicetree <[email protected]>; Rob Herring <[email protected]>; Mark Rutland <[email protected]>; Albert Ou <[email protected]>; Paul Walmsley <[email protected]>; Palmer Dabbelt <[email protected]>; Yash Shah <[email protected]>
Subject: [PATCH] riscv: dts: fu540-c000: Add "status" property to cpu node

Quoted 3 lines

Per device tree spec, the "status" property property shall be present for nodes representing CPUs in a SMP configuration. This property is currently missing in cpu 1/2/3/4 node in the fu540-c000.dtsi.

We don't need explicit "status = okay" for SOC internal devices (such as PLIC, INTC, etc) which are always enabled by default.

Absence of "status" DT prop is treated as enabled by default.

Regards,
Anup

Quoted 52 lines

---

 arch/riscv/boot/dts/sifive/fu540-c000.dtsi | 4 ++++
 1 file changed, 4 insertions(+)
arch/riscv/boot/dts/sifive/fu540-c000.dtsi +4 -1
index 4098349..0fff2a4 100644
@@ -53,6 +53,7 @@
 			mmu-type = "riscv,sv39";
 			reg = <1>;
 			riscv,isa = "rv64imafdc";
+			status = "okay";
 			tlb-split;
 			cpu1_intc: interrupt-controller {
 				#interrupt-cells = <1>;
@@ -77,6 +78,7 @@
 			mmu-type = "riscv,sv39";
 			reg = <2>;
 			riscv,isa = "rv64imafdc";
+			status = "okay";
 			tlb-split;
 			cpu2_intc: interrupt-controller {
 				#interrupt-cells = <1>;
@@ -101,6 +103,7 @@
 			mmu-type = "riscv,sv39";
 			reg = <3>;
 			riscv,isa = "rv64imafdc";
+			status = "okay";
 			tlb-split;
 			cpu3_intc: interrupt-controller {
 				#interrupt-cells = <1>;
@@ -125,6 +128,7 @@
 			mmu-type = "riscv,sv39";
 			reg = <4>;
 			riscv,isa = "rv64imafdc";
+			status = "okay";
 			tlb-split;
 			cpu4_intc: interrupt-controller {
 				#interrupt-cells = <1>;
--

2.7.4

_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv

author
#2 lore raw
Quoted 14 lines · Anup Patel
Quoted 14 lines

-----Original Message-----
From: linux-riscv <[email protected]> On Behalf Of Bin Meng
Sent: Friday, July 5, 2019 9:23 AM
To: linux-riscv <[email protected]>; devicetree <[email protected]>; Rob Herring <[email protected]>; Mark Rutland <[email protected]>; Albert Ou <[email protected]>; Paul Walmsley <[email protected]>; Palmer Dabbelt <[email protected]>; Yash Shah <[email protected]>
Subject: [PATCH] riscv: dts: fu540-c000: Add "status" property to cpu node

Quoted 7 lines
Quoted 3 lines

Per device tree spec, the "status" property property shall be present for nodes representing CPUs in a SMP configuration. This property is currently missing in cpu 1/2/3/4 node in the fu540-c000.dtsi.

We don't need explicit "status = okay" for SOC internal devices (such as PLIC, INTC, etc) which are always enabled by default.

Yes, that's fine because those device bindings do not require them.

Quoted 2 lines

Absence of "status" DT prop is treated as enabled by default.

But per current device tree spec, "status" in cpu node is mandatory. (spec uses "shall"). Missing it is a spec violation.

Regards,
Bin

author
#3 lore raw
Quoted 24 lines · Bin Meng
Quoted 14 lines · Anup Patel
Quoted 14 lines

-----Original Message-----
From: linux-riscv <[email protected]> On Behalf Of Bin Meng
Sent: Friday, July 5, 2019 9:23 AM
To: linux-riscv <[email protected]>; devicetree <[email protected]>; Rob Herring <[email protected]>; Mark Rutland <[email protected]>; Albert Ou <[email protected]>; Paul Walmsley <[email protected]>; Palmer Dabbelt <[email protected]>; Yash Shah <[email protected]>
Subject: [PATCH] riscv: dts: fu540-c000: Add "status" property to cpu node

Quoted 7 lines
Quoted 3 lines

Per device tree spec, the "status" property property shall be present for nodes representing CPUs in a SMP configuration. This property is currently missing in cpu 1/2/3/4 node in the fu540-c000.dtsi.

We don't need explicit "status = okay" for SOC internal devices (such as PLIC, INTC, etc) which are always enabled by default.

Quoted 7 lines

Yes, that's fine because those device bindings do not require them.

Quoted 2 lines

Absence of "status" DT prop is treated as enabled by default.

But per current device tree spec, "status" in cpu node is mandatory. (spec uses "shall"). Missing it is a spec violation.

Ping?

Regards,
Bin

#4 lore raw
Quoted 44 lines

-----Original Message-----
From: Bin Meng <[email protected]>
Sent: Monday, July 22, 2019 1:32 PM
To: Anup Patel <[email protected]>
Cc: linux-riscv <[email protected]>; devicetree <[email protected]>; Rob Herring <[email protected]>; Mark Rutland <[email protected]>; Albert Ou <[email protected]>; Paul Walmsley <[email protected]>; Palmer Dabbelt <[email protected]>; Yash Shah <[email protected]>
Subject: Re: [PATCH] riscv: dts: fu540-c000: Add "status" property to cpu node

Quoted 5 lines · Bin Meng
Quoted 3 lines · Anup Patel
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

-----Original Message-----
From: linux-riscv <[email protected]> On Behalf Of Bin Meng
Sent: Friday, July 5, 2019 9:23 AM
To: linux-riscv <[email protected]>; devicetree <[email protected]>; Rob Herring <[email protected]>; Mark Rutland <[email protected]>; Albert Ou <[email protected]>; Paul Walmsley

<[email protected]>;

Quoted 15 lines
Quoted 5 lines
Quoted 5 lines

Palmer Dabbelt <[email protected]>; Yash Shah <[email protected]>
Subject: [PATCH] riscv: dts: fu540-c000: Add "status" property to cpu node

Quoted 7 lines
Quoted 3 lines

Per device tree spec, the "status" property property shall be present for nodes representing CPUs in a SMP configuration. This property is currently missing in cpu 1/2/3/4 node in the fu540-c000.dtsi.

We don't need explicit "status = okay" for SOC internal devices (such as PLIC, INTC, etc) which are always enabled by default.

Yes, that's fine because those device bindings do not require them.

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

Absence of "status" DT prop is treated as enabled by default.

But per current device tree spec, "status" in cpu node is mandatory. (spec uses "shall"). Missing it is a spec violation.

Ping?

I am fine with explicit status = "okay".

I am hoping DT maintainers will share there views on this.

Regards,
Anup

#5 lore raw
In reply to Bin Meng
Quoted 23 lines · Bin Meng
Quoted 14 lines · Anup Patel
Quoted 14 lines

-----Original Message-----
From: linux-riscv <[email protected]> On Behalf Of Bin Meng
Sent: Friday, July 5, 2019 9:23 AM
To: linux-riscv <[email protected]>; devicetree <[email protected]>; Rob Herring <[email protected]>; Mark Rutland <[email protected]>; Albert Ou <[email protected]>; Paul Walmsley <[email protected]>; Palmer Dabbelt <[email protected]>; Yash Shah <[email protected]>
Subject: [PATCH] riscv: dts: fu540-c000: Add "status" property to cpu node

Quoted 7 lines
Quoted 3 lines

Per device tree spec, the "status" property property shall be present for nodes representing CPUs in a SMP configuration. This property is currently missing in cpu 1/2/3/4 node in the fu540-c000.dtsi.

We don't need explicit "status = okay" for SOC internal devices (such as PLIC, INTC, etc) which are always enabled by default.

Quoted 7 lines

Yes, that's fine because those device bindings do not require them.

Quoted 2 lines

Absence of "status" DT prop is treated as enabled by default.

But per current device tree spec, "status" in cpu node is mandatory. (spec uses "shall"). Missing it is a spec violation.

I think this is a spec bug (or at least misleading wording in the spec).

IEEE 1275 says (for status as a generic property):

The absence of this property menas that the operational status is unknown or okay.

... and I think it's fine to treat that the same as an explicit "okay" here, as we do generically in Linux.

Thanks,
Mark.

author
#6 lore raw

Hi Mark,

Quoted 33 lines · Mark Rutland
Quoted 23 lines · Bin Meng
Quoted 14 lines · Anup Patel
Quoted 14 lines

-----Original Message-----
From: linux-riscv <[email protected]> On Behalf Of Bin Meng
Sent: Friday, July 5, 2019 9:23 AM
To: linux-riscv <[email protected]>; devicetree <[email protected]>; Rob Herring <[email protected]>; Mark Rutland <[email protected]>; Albert Ou <[email protected]>; Paul Walmsley <[email protected]>; Palmer Dabbelt <[email protected]>; Yash Shah <[email protected]>
Subject: [PATCH] riscv: dts: fu540-c000: Add "status" property to cpu node

Quoted 7 lines
Quoted 3 lines

Per device tree spec, the "status" property property shall be present for nodes representing CPUs in a SMP configuration. This property is currently missing in cpu 1/2/3/4 node in the fu540-c000.dtsi.

We don't need explicit "status = okay" for SOC internal devices (such as PLIC, INTC, etc) which are always enabled by default.

Quoted 7 lines

Yes, that's fine because those device bindings do not require them.

Quoted 2 lines

Absence of "status" DT prop is treated as enabled by default.

But per current device tree spec, "status" in cpu node is mandatory. (spec uses "shall"). Missing it is a spec violation.

Quoted 6 lines

I think this is a spec bug (or at least misleading wording in the spec).

IEEE 1275 says (for status as a generic property):

The absence of this property menas that the operational status is unknown or okay.

Yes, I checked IEEE 1275 doc, and it indeed says like you mentioned.

However, it says "unknown" _or_ "okay", yet provides a definite value.

Quoted 3 lines

... and I think it's fine to treat that the same as an explicit "okay" here, as we do generically in Linux.

So what Linux does is a defacto interpretation?

If everyone agrees this is a device tree spec bug, I will submit the patch to devicetree spec then.

Regards,
Bin

author
#7 lore raw
Quoted 49 lines · Bin Meng

Hi Mark,

Quoted 33 lines · Mark Rutland
Quoted 23 lines · Bin Meng
Quoted 14 lines · Anup Patel
Quoted 14 lines

-----Original Message-----
From: linux-riscv <[email protected]> On Behalf Of Bin Meng
Sent: Friday, July 5, 2019 9:23 AM
To: linux-riscv <[email protected]>; devicetree <[email protected]>; Rob Herring <[email protected]>; Mark Rutland <[email protected]>; Albert Ou <[email protected]>; Paul Walmsley <[email protected]>; Palmer Dabbelt <[email protected]>; Yash Shah <[email protected]>
Subject: [PATCH] riscv: dts: fu540-c000: Add "status" property to cpu node

Quoted 7 lines
Quoted 3 lines

Per device tree spec, the "status" property property shall be present for nodes representing CPUs in a SMP configuration. This property is currently missing in cpu 1/2/3/4 node in the fu540-c000.dtsi.

We don't need explicit "status = okay" for SOC internal devices (such as PLIC, INTC, etc) which are always enabled by default.

Quoted 7 lines

Yes, that's fine because those device bindings do not require them.

Quoted 2 lines

Absence of "status" DT prop is treated as enabled by default.

But per current device tree spec, "status" in cpu node is mandatory. (spec uses "shall"). Missing it is a spec violation.

Quoted 6 lines

I think this is a spec bug (or at least misleading wording in the spec).

IEEE 1275 says (for status as a generic property):

The absence of this property menas that the operational status is unknown or okay.

Yes, I checked IEEE 1275 doc, and it indeed says like you mentioned.

However, it says "unknown" _or_ "okay", yet provides a definite value.

Quoted 1 line
Quoted 7 lines
Quoted 2 lines

... and I think it's fine to treat that the same as an explicit "okay" here, as we do generically in Linux.

So what Linux does is a defacto interpretation?

If everyone agrees this is a device tree spec bug, I will submit the patch to devicetree spec then.

Any comments from the device tree folks? thanks!

Regards,
Bin