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

Commit a58fc2d7 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "cpufreq: interactive: Round up timer_rate to match jiffy"

parents 2adefe85 1045189e
Loading
Loading
Loading
Loading
+8 −2
Original line number Original line Diff line number Diff line
@@ -873,12 +873,18 @@ static ssize_t store_timer_rate(struct cpufreq_interactive_tunables *tunables,
		const char *buf, size_t count)
		const char *buf, size_t count)
{
{
	int ret;
	int ret;
	unsigned long val;
	unsigned long val, val_round;


	ret = strict_strtoul(buf, 0, &val);
	ret = strict_strtoul(buf, 0, &val);
	if (ret < 0)
	if (ret < 0)
		return ret;
		return ret;
	tunables->timer_rate = val;

	val_round = jiffies_to_usecs(usecs_to_jiffies(val));
	if (val != val_round)
		pr_warn("timer_rate not aligned to jiffy. Rounded up to %lu\n",
			val_round);

	tunables->timer_rate = val_round;
	return count;
	return count;
}
}