Skip to content

Commit 121baab

Browse files
vireshkrafaeljw
authored andcommitted
cpufreq: Force sync policy boost with global boost on sysfs update
If the global boost flag is enabled and policy boost flag is disabled, a call to `cpufreq_boost_trigger_state(true)` must enable the policy's boost state. The current code misses that because of an optimization. Fix it. Suggested-by: Lifeng Zheng <[email protected]> Reviewed-by: Lifeng Zheng <[email protected]> Signed-off-by: Viresh Kumar <[email protected]> Link: https://patch.msgid.link/852ff11c589e6300730d207baac195b2d9d8b95f.1745511526.git.viresh.kumar@linaro.org Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 0e8d856 commit 121baab

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

drivers/cpufreq/cpufreq.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2809,8 +2809,10 @@ static int cpufreq_boost_trigger_state(int state)
28092809
unsigned long flags;
28102810
int ret = 0;
28112811

2812-
if (cpufreq_driver->boost_enabled == state)
2813-
return 0;
2812+
/*
2813+
* Don't compare 'cpufreq_driver->boost_enabled' with 'state' here to
2814+
* make sure all policies are in sync with global boost flag.
2815+
*/
28142816

28152817
write_lock_irqsave(&cpufreq_driver_lock, flags);
28162818
cpufreq_driver->boost_enabled = state;

0 commit comments

Comments
 (0)