mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 21:54:34 -04:00
Merge branch 'eas-dev' into android-mainline
Update to latest version of EAS Change-Id: I760cf5c0b7b869abf0564da2e4e944ee0654c88c
This commit is contained in:
commit
8ecfc2ebdf
11 changed files with 275 additions and 28 deletions
|
|
@ -22,6 +22,8 @@
|
|||
#include <linux/smp.h>
|
||||
|
||||
DEFINE_PER_CPU(unsigned long, freq_scale) = SCHED_CAPACITY_SCALE;
|
||||
DEFINE_PER_CPU(unsigned long, max_cpu_freq);
|
||||
DEFINE_PER_CPU(unsigned long, max_freq_scale) = SCHED_CAPACITY_SCALE;
|
||||
|
||||
void arch_set_freq_scale(struct cpumask *cpus, unsigned long cur_freq,
|
||||
unsigned long max_freq)
|
||||
|
|
@ -31,8 +33,29 @@ void arch_set_freq_scale(struct cpumask *cpus, unsigned long cur_freq,
|
|||
|
||||
scale = (cur_freq << SCHED_CAPACITY_SHIFT) / max_freq;
|
||||
|
||||
for_each_cpu(i, cpus)
|
||||
for_each_cpu(i, cpus) {
|
||||
per_cpu(freq_scale, i) = scale;
|
||||
per_cpu(max_cpu_freq, i) = max_freq;
|
||||
}
|
||||
}
|
||||
|
||||
void arch_set_max_freq_scale(struct cpumask *cpus,
|
||||
unsigned long policy_max_freq)
|
||||
{
|
||||
unsigned long scale, max_freq;
|
||||
int cpu = cpumask_first(cpus);
|
||||
|
||||
if (cpu > nr_cpu_ids)
|
||||
return;
|
||||
|
||||
max_freq = per_cpu(max_cpu_freq, cpu);
|
||||
if (!max_freq)
|
||||
return;
|
||||
|
||||
scale = (policy_max_freq << SCHED_CAPACITY_SHIFT) / max_freq;
|
||||
|
||||
for_each_cpu(cpu, cpus)
|
||||
per_cpu(max_freq_scale, cpu) = scale;
|
||||
}
|
||||
|
||||
DEFINE_PER_CPU(unsigned long, cpu_scale) = SCHED_CAPACITY_SCALE;
|
||||
|
|
|
|||
Loading…
Reference in a new issue