Re: [PATCH] cpufreq: intel_pstate: Allow repeated intel_pstate disable
From: srinivas pandruvada
Date: Thu Mar 05 2026 - 16:56:03 EST
On Thu, 2026-02-19 at 19:15 +0100, Fabio M. De Francesco wrote:
> Repeated intel_pstate disables currently return an error, adding
> unnecessary
> complexity to userspace scripts which must first read the current
> state and
> conditionally write 'off'.
>
> Make repeated intel_pstate disables a no-op.
>
> Cc: Artem Bityutskiy <artem.bityutskiy@xxxxxxxxx>
> Signed-off-by: Fabio M. De Francesco
> <fabio.m.de.francesco@xxxxxxxxxxxxxxx>
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@xxxxxxxxxxxxxxx>
> ---
> drivers/cpufreq/intel_pstate.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/cpufreq/intel_pstate.c
> b/drivers/cpufreq/intel_pstate.c
> index 1625ec2d0d06..d639cc150092 100644
> --- a/drivers/cpufreq/intel_pstate.c
> +++ b/drivers/cpufreq/intel_pstate.c
> @@ -3470,7 +3470,7 @@ static int intel_pstate_update_status(const
> char *buf, size_t size)
> {
> if (size == 3 && !strncmp(buf, "off", size)) {
> if (!intel_pstate_driver)
> - return -EINVAL;
> + return 0;
>
> if (hwp_active)
> return -EBUSY;