From: Viresh Kumar Date: Thu, 24 Apr 2025 16:20:15 +0000 (+0530) Subject: cpufreq: Don't unnecessarily call set_boost() X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=c347f31ae27f6196afbe812acd09af3f076ff117;p=users%2Fdwmw2%2Flinux.git cpufreq: Don't unnecessarily call set_boost() The policy specific boost value may already be set correctly in cpufreq_boost_trigger_state(), don't update it again unnecessarily. Reviewed-by: Lifeng Zheng Signed-off-by: Viresh Kumar Link: https://patch.msgid.link/3003fbdcc1850128fe7fb653d7ddb8afc4d66170.1745511526.git.viresh.kumar@linaro.org Signed-off-by: Rafael J. Wysocki --- diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 1452692d1d2c1..5e6e34e7a5b89 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -2807,7 +2807,7 @@ static int cpufreq_boost_trigger_state(int state) cpus_read_lock(); for_each_active_policy(policy) { - if (!policy->boost_supported) + if (!policy->boost_supported || policy->boost_enabled == state) continue; policy->boost_enabled = state;