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

Commit 591995f0 authored by Pavankumar Kondeti's avatar Pavankumar Kondeti
Browse files

sched: walt: fix load_to_freq() for 32 bit system



The division in load_to_freq() gives a linker error on a 32 bit
system due to implicit division of 64 bit quantities. The load
and original capacity values are scaled to 1024, so make them
unsigned int.

Change-Id: I2f01c2f0779b2c821ddaa2fca5256276c6d30ef1
Signed-off-by: default avatarPavankumar Kondeti <pkondeti@codeaurora.org>
parent 56213878
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1280,10 +1280,10 @@ static inline u64 scale_exec_time(u64 delta, struct rq *rq)
/* Convert busy time to frequency equivalent
 * Assumes load is scaled to 1024
 */
static inline unsigned int load_to_freq(struct rq *rq, u64 load)
static inline unsigned int load_to_freq(struct rq *rq, unsigned int load)
{
	return mult_frac(cpu_max_possible_freq(cpu_of(rq)), load,
			 capacity_orig_of(cpu_of(rq)));
			 (unsigned int) capacity_orig_of(cpu_of(rq)));
}

bool do_pl_notif(struct rq *rq)