cpufreq: intel_pstate: Allow repeated intel_pstate disable
Subsystems (2)
PATCH 1/1 cpufreq: intel_pstate: Allow repeated intel_pstate disable
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.
--- drivers/cpufreq/intel_pstate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/cpufreq/intel_pstate.c +1 -1
@@ -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 ;
Signature · 1 line
2.53.0
Quoted 11 lines · Fabio M. De Francesco
Repeated
intel_pstatedisables currently return an error, adding unnecessary
complexity to userspace scripts which must first read the current state and
conditionally write 'off'.Make repeated
intel_pstatedisables a no-op.Cc: Artem Bityutskiy <[email protected]>
Signed-off-by: Fabio M. De Francesco
<[email protected]>
Quoted 19 lines
---
drivers/cpufreq/intel_pstate.c | 2 +-1 file changed, 1 insertion(+), 1 deletion(-)drivers/cpufreq/intel_pstate.c +1
-1@@ -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;
Quoted 33 lines · srinivas pandruvada
Quoted 11 lines · Fabio M. De Francesco
Repeated
intel_pstatedisables currently return an error, adding unnecessary
complexity to userspace scripts which must first read the current state and
conditionally write 'off'.Make repeated
intel_pstatedisables a no-op.Cc: Artem Bityutskiy <[email protected]>
Signed-off-by: Fabio M. De Francesco
<[email protected]>Quoted 17 lines
--- drivers/cpufreq/intel_pstate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/cpufreq/intel_pstate.c +1
-1@@ -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 ;
Quoted 2 lines
Quoted 2 lines
drivers/cpufreq/intel_pstate.c +0
-0if (hwp_active)return -EBUSY;
Applied as 7.1 material, thanks!