sched/cpufreq: fix tunables for schedfreq governor
authorSteve Muckle <smuckle@linaro.org>
Tue, 25 Oct 2016 01:22:19 +0000 (18:22 -0700)
committerAmit Pundir <amit.pundir@linaro.org>
Wed, 21 Jun 2017 11:04:04 +0000 (16:34 +0530)
commitc8f8f60a716e65269cdd9e7415dadaf47fb4384a
tree7beb849271f2c4ece3505dcb8c5f9b98f1041c64
parentf49a1d8ca723d371900f1136bc1bde8a659577a4
sched/cpufreq: fix tunables for schedfreq governor

The schedfreq governor does not currently handle cpufreq drivers which
use a global set of tunables (!have_governor_per_policy).

For example on x86 and using the acpi cpufreq driver, doing this

  cat /sys/devices/system/cpu/cpufreq/sched/up_throttle_nsec

will result in a bad pointer access.

Update the tunable code using the upstream schedutil tunable code by
Rafael Wysocki as a guide.

Includes a partial backport of the reorganized cpufreq tunable
infrastructure.

Change-Id: I7e6f8de1dac297077ad43f37dd2f6ddbfe921c98
Signed-off-by: Steve Muckle <smuckle@linaro.org>
[fixed cherry-pick issue]
Signed-off-by: Juri Lelli <juri.lelli@arm.com>
[fixed cherry-pick issue]
Signed-off-by: Thierry Strudel <tstrudel@google.com>
kernel/sched/cpufreq_sched.c