Skip to content
Snippets Groups Projects
Commit 26afe8c0 authored by Chris Redpath's avatar Chris Redpath Committed by Srinath Sridharan
Browse files

WIP: arm64: reapply lost linkage between cpu capacity and freq caps


Thermal framework and other users are able to apply limits to the max
frequency allowed. The linkage to the scheduler's idea of the maximum
possible capacity for a given CPU is through scale_cpu_capacity in
topology.c but it lost the connection in a merge. Just reinstate it.

Signed-off-by: default avatarChris Redpath <chris.redpath@arm.com>
Signed-off-by: default avatarSrinath Sridharan <srinathsr@google.com>

bug: 28312446
Change-Id: I5caeb63a8c30cc8598fd0ae562d6ab3217c571ea
parent 13aa4b6e
Branches
Tags
No related merge requests found
......@@ -29,7 +29,13 @@ static DEFINE_PER_CPU(unsigned long, cpu_scale) = SCHED_CAPACITY_SCALE;
unsigned long scale_cpu_capacity(struct sched_domain *sd, int cpu)
{
#ifdef CONFIG_CPU_FREQ
unsigned long max_cap_scale = cpufreq_scale_max_freq_capacity(cpu);
return per_cpu(cpu_scale, cpu) * max_cap_scale >> SCHED_CAPACITY_SHIFT;
#else
return per_cpu(cpu_scale, cpu);
#endif
}
static void set_capacity_scale(unsigned int cpu, unsigned long capacity)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment