From 042fbcfbc8b448e416acf6c6bb4e504f6e0d093b Mon Sep 17 00:00:00 2001 From: Yaroslav Furman Date: Thu, 14 May 2020 22:42:13 +0300 Subject: [PATCH] cpu_input_boost: add prime core support Separate it from perf cluster and do not boost it at all. Signed-off-by: Yaroslav Furman --- drivers/cpufreq/cpu_input_boost.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/cpufreq/cpu_input_boost.c b/drivers/cpufreq/cpu_input_boost.c index ff80c8caa433..bf158fb06951 100644 --- a/drivers/cpufreq/cpu_input_boost.c +++ b/drivers/cpufreq/cpu_input_boost.c @@ -51,8 +51,10 @@ static unsigned int get_input_boost_freq(struct cpufreq_policy *policy) if (cpumask_test_cpu(policy->cpu, cpu_lp_mask)) freq = max(CONFIG_INPUT_BOOST_FREQ_LP, CONFIG_MIN_FREQ_LP); - else + else if (cpumask_test_cpu(policy->cpu, cpu_perf_mask)) freq = max(CONFIG_INPUT_BOOST_FREQ_PERF, CONFIG_MIN_FREQ_PERF); + else + freq = policy->min; return min(freq, policy->max); } @@ -212,8 +214,10 @@ static int cpu_notifier_cb(struct notifier_block *nb, unsigned long action, policy->min = get_input_boost_freq(policy); else if (cpumask_test_cpu(policy->cpu, cpu_lp_mask)) policy->min = CONFIG_MIN_FREQ_LP; - else + else if (cpumask_test_cpu(policy->cpu, cpu_perf_mask)) policy->min = CONFIG_MIN_FREQ_PERF; + else + policy->min = policy->cpuinfo.min_freq; return NOTIFY_OK; }