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>
struct em_perf_state *ps;
int i, cpu;
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
/*
* In order to predict the performance state, map the utilization of
* the most utilized CPU of the performance domain to a requested