cpufreq: schedutil: move cached_raw_freq to struct sugov_policy
authorViresh Kumar <viresh.kumar@linaro.org>
Thu, 2 Mar 2017 08:33:20 +0000 (14:03 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Jun 2017 13:06:05 +0000 (15:06 +0200)
commitafe8d4a51c763b9da32c993295af71252bbb7a2c
tree3c56a691f5edbed3fee969eee2e6ab36445d1eb7
parent09fcb3561d9ede40610d8f7b7fd64d2651179403
cpufreq: schedutil: move cached_raw_freq to struct sugov_policy

commit 6c4f0fa643cb9e775dcc976e3db00d649468ff1d upstream.

cached_raw_freq applies to the entire cpufreq policy and not individual
CPUs. Apart from wasting per-cpu memory, it is actually wrong to keep it
in struct sugov_cpu as we may end up comparing next_freq with a stale
cached_raw_freq of a random CPU.

Move cached_raw_freq to struct sugov_policy.

Fixes: 5cbea46984d6 (cpufreq: schedutil: map raw required frequency to driver frequency)
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/sched/cpufreq_schedutil.c