Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9e3c04be authored by Patrick Bellasi's avatar Patrick Bellasi Committed by Andres Oportus
Browse files

sched/fair: use SCHED_CAPACITY_SCALE for energy normalization



Change-Id: I686d26975f4a7dd830ff8441ff986e35461a7d55
Signed-off-by: default avatarPatrick Bellasi <patrick.bellasi@arm.com>
Signed-off-by: default avatarSrinath Sridharan <srinathsr@google.com>
parent 7b8577d9
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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(