mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
cpu_input_boost: Rewrite update_online_cpu_policy function
I saw a few warnings indicating that we were trying to get policy of invalid (8 and above) cpus. Let's try to avoid this. Change-Id: I677218a5a4e204430d9703a76533a92c10044d99 Signed-off-by: Yaroslav Furman <yaro330@gmail.com> Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
This commit is contained in:
parent
3c217f5d04
commit
0fef46c3e1
@ -74,12 +74,15 @@ static void update_online_cpu_policy(void)
|
||||
{
|
||||
unsigned int cpu;
|
||||
|
||||
/* Only one CPU from each cluster needs to be updated */
|
||||
get_online_cpus();
|
||||
cpu = cpumask_first_and(cpu_lp_mask, cpu_online_mask);
|
||||
cpufreq_update_policy(cpu);
|
||||
cpu = cpumask_first_and(cpu_perf_mask, cpu_online_mask);
|
||||
cpufreq_update_policy(cpu);
|
||||
for_each_possible_cpu(cpu) {
|
||||
if (cpu_online(cpu)) {
|
||||
if (cpumask_intersects(cpumask_of(cpu), cpu_lp_mask))
|
||||
cpufreq_update_policy(cpu);
|
||||
if (cpumask_intersects(cpumask_of(cpu), cpu_perf_mask))
|
||||
cpufreq_update_policy(cpu);
|
||||
}
|
||||
}
|
||||
put_online_cpus();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user