2023-03-24 09:34:25

by Neil Armstrong

[permalink] [raw]
Subject: [PATCH v2 2/4] arm64: dts: qcom: sm8450: remove invalid properties in cluster-sleep nodes

Fixes the following DT bindings check error:
domain-idle-states: cluster-sleep-0: 'idle-state-name', 'local-timer-stop' do not match any of the regexes:
'pinctrl-[0-9]+'
domain-idle-states: cluster-sleep-1: 'idle-state-name', 'local-timer-stop' do not match any of the regexes:
'pinctrl-[0-9]+'

Reviewed-by: Krzysztof Kozlowski <[email protected]>
Signed-off-by: Neil Armstrong <[email protected]>
---
arch/arm64/boot/dts/qcom/sm8450.dtsi | 4 ----
1 file changed, 4 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sm8450.dtsi b/arch/arm64/boot/dts/qcom/sm8450.dtsi
index 78fb65bd15cc..ff55fcfdd676 100644
--- a/arch/arm64/boot/dts/qcom/sm8450.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8450.dtsi
@@ -255,22 +255,18 @@ BIG_CPU_SLEEP_0: cpu-sleep-1-0 {
domain-idle-states {
CLUSTER_SLEEP_0: cluster-sleep-0 {
compatible = "domain-idle-state";
- idle-state-name = "cluster-l3-off";
arm,psci-suspend-param = <0x41000044>;
entry-latency-us = <1050>;
exit-latency-us = <2500>;
min-residency-us = <5309>;
- local-timer-stop;
};

CLUSTER_SLEEP_1: cluster-sleep-1 {
compatible = "domain-idle-state";
- idle-state-name = "cluster-power-collapse";
arm,psci-suspend-param = <0x4100c344>;
entry-latency-us = <2700>;
exit-latency-us = <3500>;
min-residency-us = <13959>;
- local-timer-stop;
};
};
};

--
2.34.1


2023-03-24 17:48:14

by Bjorn Andersson

[permalink] [raw]
Subject: Re: [PATCH v2 2/4] arm64: dts: qcom: sm8450: remove invalid properties in cluster-sleep nodes

On Fri, Mar 24, 2023 at 10:28:47AM +0100, Neil Armstrong wrote:
> Fixes the following DT bindings check error:

Is that because idle-state-name and local-timer-stop should not be
defined for domain-idle-states or are you just clearing out the
dtbs_check warning?

According to cpu-capacity.txt local-timer-stop seems to have been a
property relevant for clusters in the past, was this a mistake in the
binding or did something change when this was moved to
domain-idle-states?

Regards,
Bjorn

> domain-idle-states: cluster-sleep-0: 'idle-state-name', 'local-timer-stop' do not match any of the regexes:
> 'pinctrl-[0-9]+'
> domain-idle-states: cluster-sleep-1: 'idle-state-name', 'local-timer-stop' do not match any of the regexes:
> 'pinctrl-[0-9]+'
>
> Reviewed-by: Krzysztof Kozlowski <[email protected]>
> Signed-off-by: Neil Armstrong <[email protected]>
> ---
> arch/arm64/boot/dts/qcom/sm8450.dtsi | 4 ----
> 1 file changed, 4 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/qcom/sm8450.dtsi b/arch/arm64/boot/dts/qcom/sm8450.dtsi
> index 78fb65bd15cc..ff55fcfdd676 100644
> --- a/arch/arm64/boot/dts/qcom/sm8450.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sm8450.dtsi
> @@ -255,22 +255,18 @@ BIG_CPU_SLEEP_0: cpu-sleep-1-0 {
> domain-idle-states {
> CLUSTER_SLEEP_0: cluster-sleep-0 {
> compatible = "domain-idle-state";
> - idle-state-name = "cluster-l3-off";
> arm,psci-suspend-param = <0x41000044>;
> entry-latency-us = <1050>;
> exit-latency-us = <2500>;
> min-residency-us = <5309>;
> - local-timer-stop;
> };
>
> CLUSTER_SLEEP_1: cluster-sleep-1 {
> compatible = "domain-idle-state";
> - idle-state-name = "cluster-power-collapse";
> arm,psci-suspend-param = <0x4100c344>;
> entry-latency-us = <2700>;
> exit-latency-us = <3500>;
> min-residency-us = <13959>;
> - local-timer-stop;
> };
> };
> };
>
> --
> 2.34.1
>

2023-03-24 19:38:21

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v2 2/4] arm64: dts: qcom: sm8450: remove invalid properties in cluster-sleep nodes

On 24/03/2023 18:45, Bjorn Andersson wrote:
> On Fri, Mar 24, 2023 at 10:28:47AM +0100, Neil Armstrong wrote:
>> Fixes the following DT bindings check error:
>
> Is that because idle-state-name and local-timer-stop should not be
> defined for domain-idle-states or are you just clearing out the
> dtbs_check warning?
>
> According to cpu-capacity.txt local-timer-stop seems to have been a
> property relevant for clusters in the past, was this a mistake in the
> binding or did something change when this was moved to
> domain-idle-states?

I cannot find anything about local-timer-stop in cpu-capacity.txt. Where
do you see it?

Best regards,
Krzysztof

2023-03-24 19:57:16

by Bjorn Andersson

[permalink] [raw]
Subject: Re: [PATCH v2 2/4] arm64: dts: qcom: sm8450: remove invalid properties in cluster-sleep nodes

On Fri, Mar 24, 2023 at 08:27:12PM +0100, Krzysztof Kozlowski wrote:
> On 24/03/2023 18:45, Bjorn Andersson wrote:
> > On Fri, Mar 24, 2023 at 10:28:47AM +0100, Neil Armstrong wrote:
> >> Fixes the following DT bindings check error:
> >
> > Is that because idle-state-name and local-timer-stop should not be
> > defined for domain-idle-states or are you just clearing out the
> > dtbs_check warning?
> >
> > According to cpu-capacity.txt local-timer-stop seems to have been a
> > property relevant for clusters in the past, was this a mistake in the
> > binding or did something change when this was moved to
> > domain-idle-states?
>
> I cannot find anything about local-timer-stop in cpu-capacity.txt. Where
> do you see it?
>

Ohh, you're right it's only mentioned in the example.

But idle-states.yaml documents the property for both cpus and clusters,
and it's used throughout the examples.

Our cluster states are defined in domanin-idle-states instead of
idle-state, does this imply that the flag is no longer applicable
per cluster in this mode of operation?

Regards,
Bjorn

2023-03-24 20:56:15

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v2 2/4] arm64: dts: qcom: sm8450: remove invalid properties in cluster-sleep nodes

On 24/03/2023 20:57, Bjorn Andersson wrote:
> On Fri, Mar 24, 2023 at 08:27:12PM +0100, Krzysztof Kozlowski wrote:
>> On 24/03/2023 18:45, Bjorn Andersson wrote:
>>> On Fri, Mar 24, 2023 at 10:28:47AM +0100, Neil Armstrong wrote:
>>>> Fixes the following DT bindings check error:
>>>
>>> Is that because idle-state-name and local-timer-stop should not be
>>> defined for domain-idle-states or are you just clearing out the
>>> dtbs_check warning?
>>>
>>> According to cpu-capacity.txt local-timer-stop seems to have been a
>>> property relevant for clusters in the past, was this a mistake in the
>>> binding or did something change when this was moved to
>>> domain-idle-states?
>>
>> I cannot find anything about local-timer-stop in cpu-capacity.txt. Where
>> do you see it?
>>
>
> Ohh, you're right it's only mentioned in the example.
>
> But idle-states.yaml documents the property for both cpus and clusters,
> and it's used throughout the examples.
>
> Our cluster states are defined in domanin-idle-states instead of
> idle-state, does this imply that the flag is no longer applicable
> per cluster in this mode of operation?

As you noticed their meaning is interleaving. For example on SC7280 we
use arm,idle-state for cluster. But other Qualcomm platforms rather
define clusters as domain-idle-states and in that case, nothing parses
tgat flag. The flag is only for cpuidle dt_idle_states. For
power-domains it was always ignored.

Funny fact - both cpu/cluster idle-states and power-domain-idle-states
will end up eventually in cpuidle-psci.c...

Best regards,
Krzysztof