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

Commit 8726dd87 authored by Maria Yu's avatar Maria Yu Committed by Jonathan Avila
Browse files

cpufreq: schedutil: fix undefined reference to '__aeabi_uldivmod'



Division of a 64 bit variable isn't supported by the "/" operator in
a 32-bit architecture. So, use do_div() instead.

Change-Id: Id07ce36166ee1ee88ff6519dc26724c4e847890b
Signed-off-by: default avatarMaria Yu <aiquny@codeaurora.org>
Signed-off-by: default avatarJonathan Avila <avilaj@codeaurora.org>
parent 4fc19ace
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -185,7 +185,9 @@ static void sugov_track_cycles(struct sugov_policy *sg_policy,

	/* Track cycles in current window */
	delta_ns = upto - sg_policy->last_cyc_update_time;
	cycles = (prev_freq * delta_ns) / (NSEC_PER_SEC / KHZ);
	delta_ns *= prev_freq;
	do_div(delta_ns, (NSEC_PER_SEC / KHZ));
	cycles = delta_ns;
	sg_policy->curr_cycles += cycles;
	sg_policy->last_cyc_update_time = upto;
}