@@ -6527,8 +6527,12 @@ compute_energy(struct task_struct *p, int dst_cpu, struct perf_domain *pd)
struct cpumask *pd_mask = perf_domain_span(pd);
unsigned long cpu_cap = arch_scale_cpu_capacity(cpumask_first(pd_mask));
unsigned long max_util = 0, sum_util = 0;
+ unsigned long _cpu_cap, thermal_pressure;
int cpu;
+ thermal_pressure = arch_scale_thermal_pressure(cpumask_first(pd_mask));
+ _cpu_cap = cpu_cap - thermal_pressure;