diff options
| author | 2026-06-17 19:02:35 +0200 | |
|---|---|---|
| committer | 2026-07-06 20:36:37 +0200 | |
| commit | b2067d4d54bc7caf8c8b68a0de2aa61a5bd7f3d5 (patch) | |
| tree | 4f53c8ff0ecb0ed3db5cc4ae1252aa1e0645e404 | |
| parent | Linux 7.2-rc2 (diff) | |
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
| -rw-r--r-- | drivers/cpufreq/intel_pstate.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c index 5a0eeb84d382..fd524d0267a3 100644 --- a/drivers/cpufreq/intel_pstate.c +++ b/drivers/cpufreq/intel_pstate.c @@ -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; } |
