Skip to contentSkip to conversation

arm64: dts: exynos7: add support for cpuidle core power down

PATCH Superseded Chander Kashyap 2 participants 3 messages Nov 5, 2014 – Nov 11, 2014

Subsystems (2)

v4 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

PATCH v4 1/1 arm64: dts: exynos7: add support for cpuidle core power down

Exynos7 has core power down state where cores can be powered off independently. This patch adds support for this state.

Entry latency for the core power down is calculated as follows:
1. Time difference is measured between cpuidle entry and exit.
2. WFI is skipped for measuring the time.
3. Select the worst case time in the set of 100000 cpuidle transactions, with varying load.

Exit latency and target residency are supplied as per HW team

---
This patch has following dependencies:

	- [PATCH v5 0/8] arch: arm64: Enable support for Samsung Exynos7 SoC
		http://www.spinics.net/lists/linux-samsung-soc/msg37047.html

Changes in v2:
- Moved the cpu-idle-state property after reg property
- removed the status property.

Changes in v3:
- Added the Entry latency calculation in commit message.
Changes in v4:
- Corrected the commit message.
- Corrected the entry latency value.

 arch/arm64/boot/dts/exynos/exynos7.dtsi |   17 +++++++++++++++++
 1 file changed, 17 insertions(+)
arch/arm64/boot/dts/exynos/exynos7.dtsi +17 -0
index 50ae936..444dde1 100644
@@ -37,6 +37,7 @@
 			compatible = "arm,cortex-a57", "arm,armv8";
 			enable-method = "psci";
 			reg = <0x0>;
+			cpu-idle-states = <&CPU_SLEEP>;
 		};
 
 		cpu at 1 {
@@ -44,6 +45,7 @@
 			compatible = "arm,cortex-a57", "arm,armv8";
 			enable-method = "psci";
 			reg = <0x1>;
+			cpu-idle-states = <&CPU_SLEEP>;
 		};
 
 		cpu at 2 {
@@ -51,6 +53,7 @@
 			compatible = "arm,cortex-a57", "arm,armv8";
 			enable-method = "psci";
 			reg = <0x2>;
+			cpu-idle-states = <&CPU_SLEEP>;
 		};
 
 		cpu at 3 {
@@ -58,6 +61,20 @@
 			compatible = "arm,cortex-a57", "arm,armv8";
 			enable-method = "psci";
 			reg = <0x3>;
+			cpu-idle-states = <&CPU_SLEEP>;
+		};
+
+		idle-states {
+			entry-method = "arm,psci";
+
+			CPU_SLEEP: cpu-sleep {
+				compatible = "arm,idle-state";
+				local-timer-stop;
+				arm,psci-suspend-param = <0x0010000>;
+				entry-latency-us = <34>;
+				exit-latency-us = <150>;
+				min-residency-us = <2100>;
+			};
 		};
 	};
 
Signature · 1 line
1.7.9.5
Acked-by on v4 1/1
#1 lore raw
Quoted 1 line · Chander Kashyap

Exynos7 has core power down state where cores can be powered off independently.

"...has a core power down idle state..."

Quoted 1 line

This patch adds support for this state.

"...for this idle state."

Quoted 7 lines

Entry latency for the core power down is calculated as follows:
1. Time difference is measured between cpuidle entry and exit.
2. WFI is skipped for measuring the time.
3. Select the worst case time in the set of 100000 cpuidle transactions, with varying load.

Exit latency and target residency are supplied as per HW team

"Exit latency and min residency values are supplied by the HW team."

Target residency is a kernel naming scheme, non-existent in the idle state bindings.

Please take time to write proper commit logs, thanks.

Quoted 23 lines

---
This patch has following dependencies:

	- [PATCH v5 0/8] arch: arm64: Enable support for Samsung Exynos7 SoC
		http://www.spinics.net/lists/linux-samsung-soc/msg37047.html

Changes in v2:
- Moved the cpu-idle-state property after reg property
- removed the status property.

Changes in v3:
- Added the Entry latency calculation in commit message.
Changes in v4:
- Corrected the commit message.
- Corrected the entry latency value.

 arch/arm64/boot/dts/exynos/exynos7.dtsi |   17 +++++++++++++++++
 1 file changed, 17 insertions(+)
arch/arm64/boot/dts/exynos/exynos7.dtsi +0 -0
index 50ae936..444dde1 100644

arch/arm64/boot/dts/exynos/exynos7.dtsi line 38

Quoted 2 lines
arch/arm64/boot/dts/exynos/exynos7.dtsi +0 -0
@@ -37,6 +37,7 @@
 			compatible = "arm,cortex-a57", "arm,armv8";
 			enable-method = "psci";

enable-method should be after reg, it is not an ordering issues added by this patch but I still do not like that.

Other than that, please take some time to rewrite the commit log and ask to fix the ordering above, you can add my:

Quoted 46 lines
arch/arm64/boot/dts/exynos/exynos7.dtsi +17 -0
 			reg = <0x0>;
+			cpu-idle-states = <&CPU_SLEEP>;
 		};
 
 		cpu at 1 {
@@ -44,6 +45,7 @@
 			compatible = "arm,cortex-a57", "arm,armv8";
 			enable-method = "psci";
 			reg = <0x1>;
+			cpu-idle-states = <&CPU_SLEEP>;
 		};
 
 		cpu at 2 {
@@ -51,6 +53,7 @@
 			compatible = "arm,cortex-a57", "arm,armv8";
 			enable-method = "psci";
 			reg = <0x2>;
+			cpu-idle-states = <&CPU_SLEEP>;
 		};
 
 		cpu at 3 {
@@ -58,6 +61,20 @@
 			compatible = "arm,cortex-a57", "arm,armv8";
 			enable-method = "psci";
 			reg = <0x3>;
+			cpu-idle-states = <&CPU_SLEEP>;
+		};
+
+		idle-states {
+			entry-method = "arm,psci";
+
+			CPU_SLEEP: cpu-sleep {
+				compatible = "arm,idle-state";
+				local-timer-stop;
+				arm,psci-suspend-param = <0x0010000>;
+				entry-latency-us = <34>;
+				exit-latency-us = <150>;
+				min-residency-us = <2100>;
+			};
 		};
 	};
 
Signature · 1 line
1.7.9.5
#2 lore raw
Quoted 42 lines · Lorenzo Pieralisi
Quoted 1 line · Chander Kashyap

Exynos7 has core power down state where cores can be powered off independently.

"...has a core power down idle state..."

Quoted 1 line

This patch adds support for this state.

"...for this idle state."

Quoted 7 lines

Entry latency for the core power down is calculated as follows:
1. Time difference is measured between cpuidle entry and exit.
2. WFI is skipped for measuring the time.
3. Select the worst case time in the set of 100000 cpuidle transactions, with varying load.

Exit latency and target residency are supplied as per HW team

"Exit latency and min residency values are supplied by the HW team."

Target residency is a kernel naming scheme, non-existent in the idle state bindings.

Please take time to write proper commit logs, thanks.

Quoted 18 lines

---
This patch has following dependencies:
- [PATCH v5 0/8] arch: arm64: Enable support for Samsung Exynos7 SoC
http://www.spinics.net/lists/linux-samsung-soc/msg37047.html
Changes in v2:
- Moved the cpu-idle-state property after reg property
- removed the status property.

Changes in v3:
- Added the Entry latency calculation in commit message.
Changes in v4:
- Corrected the commit message.
- Corrected the entry latency value.

 arch/arm64/boot/dts/exynos/exynos7.dtsi |   17 +++++++++++++++++
 1 file changed, 17 insertions(+)
Quoted 10 lines

arch/arm64/boot/dts/exynos/exynos7.dtsi line 38

Quoted 7 lines
arch/arm64/boot/dts/exynos/exynos7.dtsi +0 -0
index 50ae936..444dde1 100644
@@ -37,6 +37,7 @@
                      compatible = "arm,cortex-a57", "arm,armv8";
                      enable-method = "psci";

enable-method should be after reg, it is not an ordering issues added by this patch but I still do not like that.

This is being taken care in new patch for Exynos7 support.

Quoted 4 lines

Other than that, please take some time to rewrite the commit log and ask to fix the ordering above, you can add my:

Yes i will change as suggested.

Thanks for the review.

Quoted 53 lines
Quoted 43 lines
arch/arm64/boot/dts/exynos/exynos7.dtsi +17 -1
                      reg = <0x0>;
+                     cpu-idle-states = <&CPU_SLEEP>;
              };
 
              cpu at 1 {
@@ -44,6 +45,7 @@
                      compatible = "arm,cortex-a57", "arm,armv8";
                      enable-method = "psci";
                      reg = <0x1>;
+                     cpu-idle-states = <&CPU_SLEEP>;
              };
 
              cpu at 2 {
@@ -51,6 +53,7 @@
                      compatible = "arm,cortex-a57", "arm,armv8";
                      enable-method = "psci";
                      reg = <0x2>;
+                     cpu-idle-states = <&CPU_SLEEP>;
              };
 
              cpu at 3 {
@@ -58,6 +61,20 @@
                      compatible = "arm,cortex-a57", "arm,armv8";
                      enable-method = "psci";
                      reg = <0x3>;
+                     cpu-idle-states = <&CPU_SLEEP>;
+             };
+
+             idle-states {
+                     entry-method = "arm,psci";
+
+                     CPU_SLEEP: cpu-sleep {
+                             compatible = "arm,idle-state";
+                             local-timer-stop;
+                             arm,psci-suspend-param = <0x0010000>;
+                             entry-latency-us = <34>;
+                             exit-latency-us = <150>;
+                             min-residency-us = <2100>;
+                     };
              };
      };
 
--
Quoted 3 lines

1.7.9.5

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel