UPSTREAM: PM / EM: Micro optimization in em_cpu_energy
When the sum of the utilization of CPUs in a power domain is zero,
return the energy as 0 without doing any computations.
Acked-by: Quentin Perret <qperret@google.com>
Reviewed-by: Dietmar Eggemann <dietmar.eggemann@arm.com>
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
(cherry picked from commit 9cc7e96aa8)
Bug: 173981595
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Change-Id: I9b1a83d210c30a8a86da26f94ac0c2f855d2ed10
This commit is contained in:
committed by
Todd Kjos
parent
f2684370d3
commit
5ed9ed0164
@@ -103,6 +103,9 @@ static inline unsigned long em_cpu_energy(struct em_perf_domain *pd,
|
||||
struct em_perf_state *ps;
|
||||
int i, cpu;
|
||||
|
||||
if (!sum_util)
|
||||
return 0;
|
||||
|
||||
/*
|
||||
* In order to predict the performance state, map the utilization of
|
||||
* the most utilized CPU of the performance domain to a requested
|
||||
|
||||
Reference in New Issue
Block a user