ARM: dts: Fix incomplete cooling-maps
Subsystems (6)
cover ARM: dts: Fix incomplete cooling-maps
Hello,
Now that the below commit are merged in mainline, we can start fixing the platform specific DT files:
commit d7a4303b8d1f ("dt-bindings: thermal: Allow multiple devices to share cooling map")
commit a92bab8919e3 ("of: thermal: Allow multiple devices to share cooling map")
Each CPU can (and does) participate in cooling down the system but the DT only captures a handful of them, normally CPU0, in the cooling maps. Things work by chance currently as under normal circumstances its the first CPU of each cluster which is used by the operating systems to probe the cooling devices. But as soon as this CPU ordering changes and any other CPU is used to bring up the cooling device, we will start seeing failures.
Also the DT is rather incomplete when we list only one CPU in the cooling maps, as the hardware doesn't have any such limitations.
Update cooling maps to include all devices affected by individual trip points.
--
viresh
Viresh Kumar (6):
ARM: dts: exynos: Add all CPUs in cooling maps
ARM: dts: ls1021a: Add all CPUs in cooling maps
ARM: dts: mt7623: Add all CPUs in cooling maps
ARM: dts: rockchip: Add all CPUs in cooling maps
ARM: dts: sunxi: Add all CPUs in cooling maps
ARM: dts: uniphier: Add all CPUs in cooling maps
arch/arm/boot/dts/exynos3250-artik5.dtsi | 6 +- arch/arm/boot/dts/exynos3250-monk.dts | 6 +- arch/arm/boot/dts/exynos3250-rinato.dts | 6 +- arch/arm/boot/dts/exynos4210-trats.dts | 4 +- arch/arm/boot/dts/exynos4210.dtsi | 2 +- .../boot/dts/exynos4412-itop-scp-core.dtsi | 8 +- arch/arm/boot/dts/exynos4412-midas.dtsi | 8 +- .../boot/dts/exynos4412-odroid-common.dtsi | 8 +- arch/arm/boot/dts/exynos4412-odroidu3.dts | 17 ++- arch/arm/boot/dts/exynos4412.dtsi | 6 +- arch/arm/boot/dts/exynos5250.dtsi | 7 +- arch/arm/boot/dts/exynos5422-odroidhc1.dts | 106 +++++++++++------- .../boot/dts/exynos5422-odroidxu3-common.dtsi | 106 +++++++++++------- arch/arm/boot/dts/ls1021a.dtsi | 2 + arch/arm/boot/dts/mt7623.dtsi | 15 ++- arch/arm/boot/dts/rk322x.dtsi | 10 +- arch/arm/boot/dts/rk3288-veyron-mickey.dts | 24 ++-- arch/arm/boot/dts/rk3288.dtsi | 15 ++- arch/arm/boot/dts/sun6i-a31.dtsi | 11 +- arch/arm/boot/dts/sun7i-a20.dtsi | 5 +- arch/arm/boot/dts/sun8i-a33.dtsi | 16 ++- arch/arm/boot/dts/uniphier-pxs2.dtsi | 6 +- 22 files changed, 250 insertions(+), 144 deletions(-)
Signature · 1 line
2.19.1.568.g152ad8e3369a
PATCH 1/6 ARM: dts: exynos: Add all CPUs in cooling maps
Each CPU can (and does) participate in cooling down the system but the DT only captures a handful of them, normally CPU0, in the cooling maps. Things work by chance currently as under normal circumstances its the first CPU of each cluster which is used by the operating systems to probe the cooling devices. But as soon as this CPU ordering changes and any other CPU is used to bring up the cooling device, we will start seeing failures.
Also the DT is rather incomplete when we list only one CPU in the cooling maps, as the hardware doesn't have any such limitations.
Update cooling maps to include all devices affected by individual trip points.
--- arch/arm/boot/dts/exynos3250-artik5.dtsi | 6 +- arch/arm/boot/dts/exynos3250-monk.dts | 6 +- arch/arm/boot/dts/exynos3250-rinato.dts | 6 +- arch/arm/boot/dts/exynos4210-trats.dts | 4 +- arch/arm/boot/dts/exynos4210.dtsi | 2 +- .../boot/dts/exynos4412-itop-scp-core.dtsi | 8 +- arch/arm/boot/dts/exynos4412-midas.dtsi | 8 +- .../boot/dts/exynos4412-odroid-common.dtsi | 8 +- arch/arm/boot/dts/exynos4412-odroidu3.dts | 17 ++- arch/arm/boot/dts/exynos4412.dtsi | 6 +- arch/arm/boot/dts/exynos5250.dtsi | 7 +- arch/arm/boot/dts/exynos5422-odroidhc1.dts | 106 +++++++++++------- .../boot/dts/exynos5422-odroidxu3-common.dtsi | 106 +++++++++++------- 13 files changed, 177 insertions(+), 113 deletions(-)
arch/arm/boot/dts/exynos3250-artik5.dtsi +4 -2
@@ -36,11 +36,13 @@ cooling-maps { map0 { /* Corresponds to 500MHz */ - cooling-device = <&cpu0 5 5>; + cooling-device = <&cpu0 5 5>, + <&cpu1 5 5>; }; map1 { /* Corresponds to 200MHz */ - cooling-device = <&cpu0 8 8>; + cooling-device = <&cpu0 8 8>, + <&cpu1 8 8>; }; }; };
arch/arm/boot/dts/exynos3250-monk.dts +4 -2
@@ -121,11 +121,13 @@ cooling-maps { map0 { /* Correspond to 500MHz at freq_table */ - cooling-device = <&cpu0 5 5>; + cooling-device = <&cpu0 5 5>, + <&cpu1 5 5>; }; map1 { /* Correspond to 200MHz at freq_table */ - cooling-device = <&cpu0 8 8>; + cooling-device = <&cpu0 8 8>, + <&cpu1 8 8>; }; }; };
arch/arm/boot/dts/exynos3250-rinato.dts +4 -2
@@ -116,11 +116,13 @@ cooling-maps { map0 { /* Corresponds to 500MHz */ - cooling-device = <&cpu0 5 5>; + cooling-device = <&cpu0 5 5>, + <&cpu1 5 5>; }; map1 { /* Corresponds to 200MHz */ - cooling-device = <&cpu0 8 8>; + cooling-device = <&cpu0 8 8>, + <&cpu1 8 8>; }; }; };
arch/arm/boot/dts/exynos4210-trats.dts +2 -2
@@ -138,11 +138,11 @@ cooling-maps { map0 { /* Corresponds to 800MHz at freq_table */ - cooling-device = <&cpu0 2 2>; + cooling-device = <&cpu0 2 2>, <&cpu1 2 2>; }; map1 { /* Corresponds to 200MHz at freq_table */ - cooling-device = <&cpu0 4 4>; + cooling-device = <&cpu0 4 4>, <&cpu1 4 4>; }; }; };
arch/arm/boot/dts/exynos4210.dtsi +1 -1
@@ -51,7 +51,7 @@ #cooling-cells = <2>; /* min followed by max */ }; - cpu at 901 { + cpu1: cpu at 901 { device_type = "cpu"; compatible = "arm,cortex-a9"; reg = <0x901>;
arch/arm/boot/dts/exynos4412-itop-scp-core.dtsi +6 -2
@@ -45,11 +45,15 @@ cooling-maps { map0 { /* Corresponds to 800MHz at freq_table */ - cooling-device = <&cpu0 7 7>; + cooling-device = <&cpu0 7 7>, <&cpu1 7 7>, + <&cpu2 7 7>, <&cpu3 7 7>; }; map1 { /* Corresponds to 200MHz at freq_table */ - cooling-device = <&cpu0 13 13>; + cooling-device = <&cpu0 13 13>, + <&cpu1 13 13>, + <&cpu2 13 13>, + <&cpu3 13 13>; }; }; };
arch/arm/boot/dts/exynos4412-midas.dtsi +6 -2
@@ -267,11 +267,15 @@ cooling-maps { map0 { /* Corresponds to 800MHz at freq_table */ - cooling-device = <&cpu0 7 7>; + cooling-device = <&cpu0 7 7>, <&cpu1 7 7>, + <&cpu2 7 7>, <&cpu3 7 7>; }; map1 { /* Corresponds to 200MHz at freq_table */ - cooling-device = <&cpu0 13 13>; + cooling-device = <&cpu0 13 13>, + <&cpu1 13 13>, + <&cpu2 13 13>, + <&cpu3 13 13>; }; }; };
arch/arm/boot/dts/exynos4412-odroid-common.dtsi +6 -2
@@ -72,11 +72,15 @@ cooling-maps { cooling_map0: map0 { /* Corresponds to 800MHz at freq_table */ - cooling-device = <&cpu0 7 7>; + cooling-device = <&cpu0 7 7>, <&cpu1 7 7>, + <&cpu2 7 7>, <&cpu3 7 7>; }; cooling_map1: map1 { /* Corresponds to 200MHz at freq_table */ - cooling-device = <&cpu0 13 13>; + cooling-device = <&cpu0 13 13>, + <&cpu1 13 13>, + <&cpu2 13 13>, + <&cpu3 13 13>; }; }; };
arch/arm/boot/dts/exynos4412-odroidu3.dts +7 -10
@@ -45,24 +45,21 @@ cooling-maps { map0 { trip = <&cpu_alert1>; - cooling-device = <&cpu0 9 9>; + cooling-device = <&cpu0 9 9>, <&cpu1 9 9>, + <&cpu2 9 9>, <&cpu3 9 9>, <&fan0 1 2>; }; map1 { trip = <&cpu_alert2>; - cooling-device = <&cpu0 15 15>; + cooling-device = <&cpu0 15 15>, + <&cpu1 15 15>, + <&cpu2 15 15>, + <&cpu3 15 15>, + <&fan0 2 3>; }; map2 { trip = <&cpu_alert0>; cooling-device = <&fan0 0 1>; }; - map3 { - trip = <&cpu_alert1>; - cooling-device = <&fan0 1 2>; - }; - map4 { - trip = <&cpu_alert2>; - cooling-device = <&fan0 2 3>; - }; }; }; };
arch/arm/boot/dts/exynos4412.dtsi +3 -3
@@ -45,7 +45,7 @@ #cooling-cells = <2>; /* min followed by max */ }; - cpu at a01 { + cpu1: cpu at a01 { device_type = "cpu"; compatible = "arm,cortex-a9"; reg = <0xA01>;
@@ -55,7 +55,7 @@ #cooling-cells = <2>; /* min followed by max */ }; - cpu at a02 { + cpu2: cpu at a02 { device_type = "cpu"; compatible = "arm,cortex-a9"; reg = <0xA02>;
@@ -65,7 +65,7 @@ #cooling-cells = <2>; /* min followed by max */ }; - cpu at a03 { + cpu3: cpu at a03 { device_type = "cpu"; compatible = "arm,cortex-a9"; reg = <0xA03>;
arch/arm/boot/dts/exynos5250.dtsi +4 -3
@@ -59,7 +59,7 @@ operating-points-v2 = <&cpu0_opp_table>; #cooling-cells = <2>; /* min followed by max */ }; - cpu at 1 { + cpu1: cpu at 1 { device_type = "cpu"; compatible = "arm,cortex-a15"; reg = <1>;
@@ -1087,11 +1087,12 @@ cooling-maps { map0 { /* Corresponds to 800MHz at freq_table */ - cooling-device = <&cpu0 9 9>; + cooling-device = <&cpu0 9 9>, <&cpu1 9 9>; }; map1 { /* Corresponds to 200MHz at freq_table */ - cooling-device = <&cpu0 15 15>; + cooling-device = <&cpu0 15 15>, + <&cpu1 15 15>; }; }; };
arch/arm/boot/dts/exynos5422-odroidhc1.dts +65 -41
146 lines not on this page · raw message
arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi +65 -41
146 lines not on this page · raw message
Signature · 1 line
2.19.1.568.g152ad8e3369a
Re: [PATCH 1/6] ARM: dts: exynos: Add all CPUs in cooling maps
Quoted 15 lines · Viresh Kumar
Each CPU can (and does) participate in cooling down the system but the DT only captures a handful of them, normally CPU0, in the cooling maps. Things work by chance currently as under normal circumstances its the first CPU of each cluster which is used by the operating systems to probe the cooling devices. But as soon as this CPU ordering changes and any other CPU is used to bring up the cooling device, we will start seeing failures.
Also the DT is rather incomplete when we list only one CPU in the cooling maps, as the hardware doesn't have any such limitations.
Update cooling maps to include all devices affected by individual trip points.
Signed-off-by Viresh Kumar <[email protected]>
Quoted 14 lines
--- arch/arm/boot/dts/exynos3250-artik5.dtsi | 6 +- arch/arm/boot/dts/exynos3250-monk.dts | 6 +- arch/arm/boot/dts/exynos3250-rinato.dts | 6 +- arch/arm/boot/dts/exynos4210-trats.dts | 4 +- arch/arm/boot/dts/exynos4210.dtsi | 2 +- .../boot/dts/exynos4412-itop-scp-core.dtsi | 8 +- arch/arm/boot/dts/exynos4412-midas.dtsi | 8 +- .../boot/dts/exynos4412-odroid-common.dtsi | 8 +- arch/arm/boot/dts/exynos4412-odroidu3.dts | 17 ++- arch/arm/boot/dts/exynos4412.dtsi | 6 +- arch/arm/boot/dts/exynos5250.dtsi | 7 +- arch/arm/boot/dts/exynos5422-odroidhc1.dts | 106 +++++++++++------- .../boot/dts/exynos5422-odroidxu3-common.dtsi | 106 +++++++++++-------
Thanks, applied.
Best regards,
Krzysztof
PATCH 2/6 ARM: dts: ls1021a: Add all CPUs in cooling maps
In reply to Viresh KumarEach CPU can (and does) participate in cooling down the system but the DT only captures a handful of them, normally CPU0, in the cooling maps. Things work by chance currently as under normal circumstances its the first CPU of each cluster which is used by the operating systems to probe the cooling devices. But as soon as this CPU ordering changes and any other CPU is used to bring up the cooling device, we will start seeing failures.
Also the DT is rather incomplete when we list only one CPU in the cooling maps, as the hardware doesn't have any such limitations.
Update cooling maps to include all devices affected by individual trip points.
--- arch/arm/boot/dts/ls1021a.dtsi | 2 ++ 1 file changed, 2 insertions(+)
arch/arm/boot/dts/ls1021a.dtsi +2 -0
@@ -324,6 +324,8 @@ trip = <&cpu_alert>; cooling-device = <&cpu0 THERMAL_NO_LIMIT + THERMAL_NO_LIMIT>, + <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; }; };
Signature · 1 line
2.19.1.568.g152ad8e3369a
Shawn Guo
AppliedRe: [PATCH 2/6] ARM: dts: ls1021a: Add all CPUs in cooling maps
Quoted 8 lines · Viresh Kumar
Each CPU can (and does) participate in cooling down the system but the DT only captures a handful of them, normally CPU0, in the cooling maps. Things work by chance currently as under normal circumstances its the first CPU of each cluster which is used by the operating systems to probe the cooling devices. But as soon as this CPU ordering changes and any other CPU is used to bring up the cooling device, we will start seeing failures.
Quoted 7 lines
Also the DT is rather incomplete when we list only one CPU in the cooling maps, as the hardware doesn't have any such limitations.
Update cooling maps to include all devices affected by individual trip points.
Signed-off-by Viresh Kumar <[email protected]>
Applied, thanks.
PATCH 3/6 ARM: dts: mt7623: Add all CPUs in cooling maps
In reply to Viresh KumarEach CPU can (and does) participate in cooling down the system but the DT only captures a handful of them, normally CPU0, in the cooling maps. Things work by chance currently as under normal circumstances its the first CPU of each cluster which is used by the operating systems to probe the cooling devices. But as soon as this CPU ordering changes and any other CPU is used to bring up the cooling device, we will start seeing failures.
Also the DT is rather incomplete when we list only one CPU in the cooling maps, as the hardware doesn't have any such limitations.
Update cooling maps to include all devices affected by individual trip points.
--- arch/arm/boot/dts/mt7623.dtsi | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-)
arch/arm/boot/dts/mt7623.dtsi +12 -3
@@ -187,17 +187,26 @@ cooling-maps { map0 { trip = <&cpu_passive>; - cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; }; map1 { trip = <&cpu_active>; - cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; }; map2 { trip = <&cpu_hot>; - cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; }; }; };
Signature · 1 line
2.19.1.568.g152ad8e3369a
PATCH 4/6 ARM: dts: rockchip: Add all CPUs in cooling maps
In reply to Viresh KumarEach CPU can (and does) participate in cooling down the system but the DT only captures a handful of them, normally CPU0, in the cooling maps. Things work by chance currently as under normal circumstances its the first CPU of each cluster which is used by the operating systems to probe the cooling devices. But as soon as this CPU ordering changes and any other CPU is used to bring up the cooling device, we will start seeing failures.
Also the DT is rather incomplete when we list only one CPU in the cooling maps, as the hardware doesn't have any such limitations.
Update cooling maps to include all devices affected by individual trip points.
--- arch/arm/boot/dts/rk322x.dtsi | 10 +++++++-- arch/arm/boot/dts/rk3288-veyron-mickey.dts | 24 +++++++++++++--------- arch/arm/boot/dts/rk3288.dtsi | 15 +++++++++++--- 3 files changed, 34 insertions(+), 15 deletions(-)
arch/arm/boot/dts/rk322x.dtsi +8 -2
@@ -493,12 +493,18 @@ map0 { trip = <&cpu_alert0>; cooling-device = - <&cpu0 THERMAL_NO_LIMIT 6>; + <&cpu0 THERMAL_NO_LIMIT 6>, + <&cpu1 THERMAL_NO_LIMIT 6>, + <&cpu2 THERMAL_NO_LIMIT 6>, + <&cpu3 THERMAL_NO_LIMIT 6>; }; map1 { trip = <&cpu_alert1>; cooling-device = - <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; }; }; };
arch/arm/boot/dts/rk3288-veyron-mickey.dts +14 -10
@@ -81,8 +81,10 @@ */ cpu_warm_limit_cpu { trip = <&cpu_alert_warm>; - cooling-device = - <&cpu0 THERMAL_NO_LIMIT 4>; + cooling-device = <&cpu0 THERMAL_NO_LIMIT 4>, + <&cpu1 THERMAL_NO_LIMIT 4>, + <&cpu2 THERMAL_NO_LIMIT 4>, + <&cpu3 THERMAL_NO_LIMIT 4>; }; /*
@@ -103,23 +105,25 @@ */ cpu_almost_hot_limit_cpu { trip = <&cpu_alert_almost_hot>; - cooling-device = - <&cpu0 5 6>; + cooling-device = <&cpu0 5 6>, <&cpu1 5 6>, <&cpu2 5 6>, + <&cpu3 5 6>; }; cpu_hot_limit_cpu { trip = <&cpu_alert_hot>; - cooling-device = - <&cpu0 7 7>; + cooling-device = <&cpu0 7 7>, <&cpu1 7 7>, <&cpu2 7 7>, + <&cpu3 7 7>; }; cpu_hotter_limit_cpu { trip = <&cpu_alert_hotter>; - cooling-device = - <&cpu0 7 8>; + cooling-device = <&cpu0 7 8>, <&cpu1 7 8>, <&cpu2 7 8>, + <&cpu3 7 8>; }; cpu_very_hot_limit_cpu { trip = <&cpu_alert_very_hot>; - cooling-device = - <&cpu0 8 THERMAL_NO_LIMIT>; + cooling-device = <&cpu0 8 THERMAL_NO_LIMIT>, + <&cpu1 8 THERMAL_NO_LIMIT>, + <&cpu2 8 THERMAL_NO_LIMIT>, + <&cpu3 8 THERMAL_NO_LIMIT>; }; }; };
arch/arm/boot/dts/rk3288.dtsi +12 -3
@@ -508,12 +508,18 @@ map0 { trip = <&cpu_alert0>; cooling-device = - <&cpu0 THERMAL_NO_LIMIT 6>; + <&cpu0 THERMAL_NO_LIMIT 6>, + <&cpu1 THERMAL_NO_LIMIT 6>, + <&cpu2 THERMAL_NO_LIMIT 6>, + <&cpu3 THERMAL_NO_LIMIT 6>; }; map1 { trip = <&cpu_alert1>; cooling-device = - <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; }; }; };
@@ -541,7 +547,10 @@ map0 { trip = <&gpu_alert0>; cooling-device = - <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; }; }; };
Signature · 1 line
2.19.1.568.g152ad8e3369a
Heiko Stuebner
maintainerRe: [PATCH 4/6] ARM: dts: rockchip: Add all CPUs in cooling maps
Am Freitag, 16. November 2018, 11:01:13 CET schrieb Viresh Kumar:
Quoted 8 lines
Each CPU can (and does) participate in cooling down the system but the DT only captures a handful of them, normally CPU0, in the cooling maps. Things work by chance currently as under normal circumstances its the first CPU of each cluster which is used by the operating systems to probe the cooling devices. But as soon as this CPU ordering changes and any other CPU is used to bring up the cooling device, we will start seeing failures.
Quoted 7 lines
Also the DT is rather incomplete when we list only one CPU in the cooling maps, as the hardware doesn't have any such limitations.
Update cooling maps to include all devices affected by individual trip points.
Signed-off-by Viresh Kumar <[email protected]>
looks like I forgot to respond ... applied like 7 days ago and already part of my pull-request for 4.21
Thanks
Heiko
PATCH 5/6 ARM: dts: sunxi: Add all CPUs in cooling maps
In reply to Viresh KumarEach CPU can (and does) participate in cooling down the system but the DT only captures a handful of them, normally CPU0, in the cooling maps. Things work by chance currently as under normal circumstances its the first CPU of each cluster which is used by the operating systems to probe the cooling devices. But as soon as this CPU ordering changes and any other CPU is used to bring up the cooling device, we will start seeing failures.
Also the DT is rather incomplete when we list only one CPU in the cooling maps, as the hardware doesn't have any such limitations.
Update cooling maps to include all devices affected by individual trip points.
--- arch/arm/boot/dts/sun6i-a31.dtsi | 11 +++++++---- arch/arm/boot/dts/sun7i-a20.dtsi | 5 +++-- arch/arm/boot/dts/sun8i-a33.dtsi | 16 +++++++++++----- 3 files changed, 21 insertions(+), 11 deletions(-)
arch/arm/boot/dts/sun6i-a31.dtsi +7 -4
@@ -115,7 +115,7 @@ #cooling-cells = <2>; }; - cpu at 1 { + cpu1: cpu at 1 { compatible = "arm,cortex-a7"; device_type = "cpu"; reg = <1>;
@@ -131,7 +131,7 @@ #cooling-cells = <2>; }; - cpu at 2 { + cpu2: cpu at 2 { compatible = "arm,cortex-a7"; device_type = "cpu"; reg = <2>;
@@ -147,7 +147,7 @@ #cooling-cells = <2>; }; - cpu at 3 { + cpu3: cpu at 3 { compatible = "arm,cortex-a7"; device_type = "cpu"; reg = <3>;
@@ -174,7 +174,10 @@ cooling-maps { map0 { trip = <&cpu_alert0>; - cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; }; };
arch/arm/boot/dts/sun7i-a20.dtsi +3 -2
@@ -118,7 +118,7 @@ #cooling-cells = <2>; }; - cpu at 1 { + cpu1: cpu at 1 { compatible = "arm,cortex-a7"; device_type = "cpu"; reg = <1>;
@@ -148,7 +148,8 @@ cooling-maps { map0 { trip = <&cpu_alert0>; - cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; }; };
arch/arm/boot/dts/sun8i-a33.dtsi +11 -5
@@ -131,14 +131,14 @@ #cooling-cells = <2>; }; - cpu at 1 { + cpu1: cpu at 1 { clocks = <&ccu CLK_CPUX>; clock-names = "cpu"; operating-points-v2 = <&cpu0_opp_table>; #cooling-cells = <2>; }; - cpu at 2 { + cpu2: cpu at 2 { compatible = "arm,cortex-a7"; device_type = "cpu"; reg = <2>;
@@ -148,7 +148,7 @@ #cooling-cells = <2>; }; - cpu at 3 { + cpu3: cpu at 3 { compatible = "arm,cortex-a7"; device_type = "cpu"; reg = <3>;
@@ -479,11 +479,17 @@ cooling-maps { map0 { trip = <&cpu_alert0>; - cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; }; map1 { trip = <&cpu_alert1>; - cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; }; map2 {
Signature · 1 line
2.19.1.568.g152ad8e3369a
Maxime Ripard
AppliedRe: [PATCH 5/6] ARM: dts: sunxi: Add all CPUs in cooling maps
Quoted 8 lines · Viresh Kumar
Each CPU can (and does) participate in cooling down the system but the DT only captures a handful of them, normally CPU0, in the cooling maps. Things work by chance currently as under normal circumstances its the first CPU of each cluster which is used by the operating systems to probe the cooling devices. But as soon as this CPU ordering changes and any other CPU is used to bring up the cooling device, we will start seeing failures.
Quoted 7 lines
Also the DT is rather incomplete when we list only one CPU in the cooling maps, as the hardware doesn't have any such limitations.
Update cooling maps to include all devices affected by individual trip points.
Signed-off-by Viresh Kumar <[email protected]>
Applied, thanks!
Maxime
Signature · 10 lines
Maxime Ripard, Bootlin Embedded Linux and Kernel engineering https://bootlin.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 228 bytes Desc: not available URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20181119/3d730f6c/attachment.sig>
PATCH 6/6 ARM: dts: uniphier: Add all CPUs in cooling maps
In reply to Viresh KumarEach CPU can (and does) participate in cooling down the system but the DT only captures a handful of them, normally CPU0, in the cooling maps. Things work by chance currently as under normal circumstances its the first CPU of each cluster which is used by the operating systems to probe the cooling devices. But as soon as this CPU ordering changes and any other CPU is used to bring up the cooling device, we will start seeing failures.
Also the DT is rather incomplete when we list only one CPU in the cooling maps, as the hardware doesn't have any such limitations.
Update cooling maps to include all devices affected by individual trip points.
--- arch/arm/boot/dts/uniphier-pxs2.dtsi | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
arch/arm/boot/dts/uniphier-pxs2.dtsi +4 -2
@@ -141,8 +141,10 @@ cooling-maps { map { trip = <&cpu_alert>; - cooling-device = <&cpu0 - THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; }; }; };
Signature · 1 line
2.19.1.568.g152ad8e3369a
Masahiro Yamada
AppliedRe: [PATCH 6/6] ARM: dts: uniphier: Add all CPUs in cooling maps
Quoted 9 lines · Viresh Kumar
Each CPU can (and does) participate in cooling down the system but the DT only captures a handful of them, normally CPU0, in the cooling maps. Things work by chance currently as under normal circumstances its the first CPU of each cluster which is used by the operating systems to probe the cooling devices. But as soon as this CPU ordering changes and any other CPU is used to bring up the cooling device, we will start seeing failures.
Quoted 7 lines
Also the DT is rather incomplete when we list only one CPU in the cooling maps, as the hardware doesn't have any such limitations.
Update cooling maps to include all devices affected by individual trip points.
Signed-off-by Viresh Kumar <[email protected]>
Applied to linux-uniphier.
Thanks.
Quoted 24 lines
--- arch/arm/boot/dts/uniphier-pxs2.dtsi | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)arch/arm/boot/dts/uniphier-pxs2.dtsi +4
-3@@ -141,8 +141,10 @@ cooling-maps { map { trip = <&cpu_alert>; - cooling-device = <&cpu0 - THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; }; }; }; --2.19.1.568.g152ad8e3369a
Signature · 2 lines
Best Regards Masahiro Yamada