]> git.ipfire.org Git - people/arne_f/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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 31 Jan 2018 13:03:50 +0000 (14:03 +0100)
commitc83189edf416ac10b55ca48292158df460c13cd5
treee9302893f4c8ab4c15acc893259f920bc1eb0471
parentc43db1a3c7caf82a6d59401e617fd5c6fc0bf40d
cpufreq: governor: Ensure sufficiently large sampling intervals

commit 56026645e2b6f11ede34a5e6ab69d3eb56f9c8fc upstream.

After commit aa7519af450d (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: aa7519af450d (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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/cpufreq/cpufreq_governor.c