Re: [PATCH 1/2] dt-bindings: arm: idle-states: Add idle-state-disabled property

From: Sudeep Holla
Date: Thu Jun 15 2023 - 04:56:38 EST


On Thu, Jun 08, 2023 at 02:25:42PM +0530, Tushar Nimkar wrote:
> This change adds idle-state-disabled property using which certain or all
> idle-states can be kept disabled during boot-up. Once boot-up is completed
> same can be enabled using below command.
>
> echo N > /sys/devices/system/cpu/cpuX/cpuidle/stateX/disable
>
> Cc: devicetree@xxxxxxxxxxxxxxx
> Signed-off-by: Tushar Nimkar <quic_tnimkar@xxxxxxxxxxx>
> ---
> Documentation/devicetree/bindings/cpu/idle-states.yaml | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/cpu/idle-states.yaml b/Documentation/devicetree/bindings/cpu/idle-states.yaml
> index b8cc826c9501..f999bc666bbd 100644
> --- a/Documentation/devicetree/bindings/cpu/idle-states.yaml
> +++ b/Documentation/devicetree/bindings/cpu/idle-states.yaml
> @@ -358,6 +358,13 @@ patternProperties:
> systems entry-latency-us + exit-latency-us will exceed
> wakeup-latency-us by this duration.
>
> + idle-state-disabled:
> + description: |
> + If present the idle state stays disabled. It can be enabled back from
> + shell using below command.
> + echo N > /sys/devices/system/cpu/cpuX/cpuidle/stateX/disable
> + type: boolean
> +

This is clearly a policy and not a hardware or firmware feature to expose
in the device tree. So NACK, why can't you load it modules if you don't want
idle states in the boot.

It is same as choosing any default governor or performance states, will you
add those next ? It is simply policy not a feature/property to be exposed
in the device tree.

--
Regards,
Sudeep