* [PATCH] cpufreq: intel_pstate: Allow repeated intel_pstate disable
@ 2026-02-19 18:15 Fabio M. De Francesco
2026-03-05 21:50 ` srinivas pandruvada
0 siblings, 1 reply; 3+ messages in thread
From: Fabio M. De Francesco @ 2026-02-19 18:15 UTC (permalink / raw)
To: linux-kernel
Cc: Srinivas Pandruvada, Len Brown, Rafael J . Wysocki, Viresh Kumar,
linux-pm, Fabio M. De Francesco, Artem Bityutskiy
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@intel.com>
Signed-off-by: Fabio M. De Francesco <fabio.m.de.francesco@linux.intel.com>
---
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;
--
2.53.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] cpufreq: intel_pstate: Allow repeated intel_pstate disable
2026-02-19 18:15 [PATCH] cpufreq: intel_pstate: Allow repeated intel_pstate disable Fabio M. De Francesco
@ 2026-03-05 21:50 ` srinivas pandruvada
2026-03-06 18:19 ` Rafael J. Wysocki
0 siblings, 1 reply; 3+ messages in thread
From: srinivas pandruvada @ 2026-03-05 21:50 UTC (permalink / raw)
To: Fabio M. De Francesco, linux-kernel
Cc: Len Brown, Rafael J . Wysocki, Viresh Kumar, linux-pm,
Artem Bityutskiy
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@intel.com>
> Signed-off-by: Fabio M. De Francesco
> <fabio.m.de.francesco@linux.intel.com>
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
> ---
> 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;
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] cpufreq: intel_pstate: Allow repeated intel_pstate disable
2026-03-05 21:50 ` srinivas pandruvada
@ 2026-03-06 18:19 ` Rafael J. Wysocki
0 siblings, 0 replies; 3+ messages in thread
From: Rafael J. Wysocki @ 2026-03-06 18:19 UTC (permalink / raw)
To: srinivas pandruvada, Fabio M. De Francesco
Cc: linux-kernel, Len Brown, Rafael J . Wysocki, Viresh Kumar,
linux-pm, Artem Bityutskiy
On Thu, Mar 5, 2026 at 10:51 PM srinivas pandruvada
<srinivas.pandruvada@linux.intel.com> wrote:
>
> 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@intel.com>
> > Signed-off-by: Fabio M. De Francesco
> > <fabio.m.de.francesco@linux.intel.com>
>
> Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
>
> > ---
> > 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;
Applied as 7.1 material, thanks!
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-03-06 18:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-19 18:15 [PATCH] cpufreq: intel_pstate: Allow repeated intel_pstate disable Fabio M. De Francesco
2026-03-05 21:50 ` srinivas pandruvada
2026-03-06 18:19 ` Rafael J. Wysocki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox