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

Commit b89646bf authored by Maria Yu's avatar Maria Yu Committed by Santosh Mardi
Browse files

cpufreq: schedutil: fix undefined reference to '__aeabi_uldivmod'



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

Change-Id: Id07ce36166ee1ee88ff6519dc26724c4e847890b
Signed-off-by: default avatarMaria Yu <aiquny@codeaurora.org>
parent 0abd32ff
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -153,7 +153,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;
}