mirror of
https://github.com/torvalds/linux.git
synced 2026-09-23 13:14:02 +02:00
cpufreq: intel_pstate: Rearrange checks in hybrid_get_cost()
Make the checks in hybrid_get_cost() more straightforward. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Link: https://patch.msgid.link/2832945.mvXUDI8C0e@rafael.j.wysocki
This commit is contained in:
parent
8cdeaa50ea
commit
b2067d4d54
|
|
@ -979,12 +979,10 @@ static int hybrid_get_cost(struct device *dev, unsigned long freq,
|
|||
* capacity. Similarly, P-cores start to be populated when E-cores are
|
||||
* utilized above 60% of the capacity.
|
||||
*/
|
||||
if (hybrid_get_cpu_type(dev->id) == INTEL_CPU_TYPE_ATOM) {
|
||||
if (hybrid_has_l3(dev->id)) /* E-core */
|
||||
*cost += 1;
|
||||
} else { /* P-core */
|
||||
if (hybrid_get_cpu_type(dev->id) == INTEL_CPU_TYPE_CORE) /* P-core */
|
||||
*cost += 2;
|
||||
}
|
||||
else if (hybrid_has_l3(dev->id)) /* E-core */
|
||||
*cost += 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user