cpufreq: intel_pstate: Driver-specific handling of _PPC updates
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 26 Mar 2019 11:15:13 +0000 (12:15 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 1 Apr 2019 21:43:05 +0000 (23:43 +0200)
commit5a25e3f7cc538fb49e11267c1e41c54ccf83835e
treee964c1948f3065cc885e0c36fe1b061c3d5ffd45
parent79a3aaa7b82e3106be97842dedfd8429248896e6
cpufreq: intel_pstate: Driver-specific handling of _PPC updates

In some cases, the platform firmware disables or enables turbo
frequencies for all CPUs globally before triggering a _PPC change
notification for one of them.  Obviously, that global change affects
all CPUs, not just the notified one, and it needs to be acted upon by
cpufreq.

The intel_pstate driver is able to detect such global changes of
the settings, but it also needs to update policy limits for all
CPUs if that happens, in particular if turbo frequencies are
enabled globally - to allow them to be used.

For this reason, introduce a new cpufreq driver callback to be
invoked on _PPC notifications, if present, instead of simply
calling cpufreq_update_policy() for the notified CPU and make
intel_pstate use it to trigger policy updates for all CPUs
in the system if global settings change.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=200759
Reported-by: Gabriele Mazzotta <gabriele.mzt@gmail.com>
Tested-by: Gabriele Mazzotta <gabriele.mzt@gmail.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
drivers/acpi/processor_perflib.c
drivers/cpufreq/cpufreq.c
drivers/cpufreq/intel_pstate.c
include/linux/cpufreq.h