sched/fair: use SCHED_CAPACITY_SCALE for energy normalization

Change-Id: I686d26975f4a7dd830ff8441ff986e35461a7d55
Signed-off-by: Patrick Bellasi <patrick.bellasi@arm.com>
Signed-off-by: Srinath Sridharan <srinathsr@google.com>
This commit is contained in:
Patrick Bellasi 2016-10-13 18:13:20 +01:00 committed by Andres Oportus
parent 7b8577d94c
commit 9e3c04bef7

View file

@ -5600,7 +5600,7 @@ struct target_nrg schedtune_target_nrg;
/*
* System energy normalization
* Returns the normalized value, in the range [0..SCHED_LOAD_SCALE],
* Returns the normalized value, in the range [0..SCHED_CAPACITY_SCALE],
* corresponding to the specified energy variation.
*/
static inline int
@ -5620,7 +5620,7 @@ normalize_energy(int energy_diff)
normalized_nrg = (energy_diff < 0) ? -energy_diff : energy_diff;
/* Scale by energy magnitude */
normalized_nrg <<= SCHED_LOAD_SHIFT;
normalized_nrg <<= SCHED_CAPACITY_SHIFT;
/* Normalize on max energy for target platform */
normalized_nrg = reciprocal_divide(