]> git.baikalelectronics.ru Git - kernel.git/commit
cpufreq: governor: Ensure sufficiently large sampling intervals
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 18 Dec 2017 01:15:32 +0000 (02:15 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 18 Dec 2017 11:09:39 +0000 (12:09 +0100)
commite79e78f90721602b1580846c32b144ec97d86211
tree4cf4a458d91fe51a6a2d41b05354776bdb0e0933
parent775d8e34afc548b3373c20d7de118504782e881a
cpufreq: governor: Ensure sufficiently large sampling intervals

After commit 1d9882dc5227 (cpufreq: Use transition_delay_us for legacy
governors as well) the sampling_rate field of struct dbs_data may be
less than the tick period which causes dbs_update() to produce
incorrect results, so make the code ensure that the value of that
field will always be sufficiently large.

Fixes: 1d9882dc5227 (cpufreq: Use transition_delay_us for legacy governors as well)
Reported-by: Andy Tang <andy.tang@nxp.com>
Reported-by: Doug Smythies <dsmythies@telus.net>
Tested-by: Andy Tang <andy.tang@nxp.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
drivers/cpufreq/cpufreq_governor.c