PM / EM: Micro optimization in em_pd_energy
If the sum of the utilization of CPUs in a power domain is zero, return the energy as 0 instead of doing any math. Change-Id: I9b1a83d210c30a8a86da26f94ac0c2f855d2ed10 Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
This commit is contained in:
parent
17186baa4c
commit
061b94ae4c
1 changed files with 3 additions and 0 deletions
|
@ -83,6 +83,9 @@ static inline unsigned long em_pd_energy(struct em_perf_domain *pd,
|
|||
struct em_cap_state *cs;
|
||||
int i, cpu;
|
||||
|
||||
if (!sum_util)
|
||||
return 0;
|
||||
|
||||
/*
|
||||
* In order to predict the capacity state, map the utilization of the
|
||||
* most utilized CPU of the performance domain to a requested frequency,
|
||||
|
|
Loading…
Reference in a new issue