linux_dsm_epyc7002/Documentation/cpu-freq
Viresh Kumar 1c03a2d04d cpufreq: add support for intermediate (stable) frequencies
Douglas Anderson, recently pointed out an interesting problem due to which
udelay() was expiring earlier than it should.

While transitioning between frequencies few platforms may temporarily switch to
a stable frequency, waiting for the main PLL to stabilize.

For example: When we transition between very low frequencies on exynos, like
between 200MHz and 300MHz, we may temporarily switch to a PLL running at 800MHz.
No CPUFREQ notification is sent for that. That means there's a period of time
when we're running at 800MHz but loops_per_jiffy is calibrated at between 200MHz
and 300MHz. And so udelay behaves badly.

To get this fixed in a generic way, introduce another set of callbacks
get_intermediate() and target_intermediate(), only for drivers with
target_index() and CPUFREQ_ASYNC_NOTIFICATION unset.

get_intermediate() should return a stable intermediate frequency platform wants
to switch to, and target_intermediate() should set CPU to that frequency,
before jumping to the frequency corresponding to 'index'. Core will take care of
sending notifications and driver doesn't have to handle them in
target_intermediate() or target_index().

NOTE: ->target_index() should restore to policy->restore_freq in case of
failures as core would send notifications for that.

Tested-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2014-06-05 23:32:29 +02:00
..
amd-powernow.txt
boost.txt Documentation: cpufreq / boost: Update BOOST documentation 2014-01-17 02:00:45 +01:00
core.txt PM / OPP: Move cpufreq specific OPP functions out of generic OPP library 2014-05-07 00:39:03 +02:00
cpu-drivers.txt cpufreq: add support for intermediate (stable) frequencies 2014-06-05 23:32:29 +02:00
cpufreq-nforce2.txt
cpufreq-stats.txt
governors.txt cpufreq: Implement light weight ->target_index() routine 2013-10-25 22:42:24 +02:00
index.txt cpufreq: Make linux-pm@vger.kernel.org official mailing list 2014-05-01 01:15:32 +02:00
intel-pstate.txt Documentation / cpufreq: add intel-pstate.txt 2014-01-06 01:14:25 +01:00
pcc-cpufreq.txt [CPUFREQ] Processor Clocking Control interface driver 2010-01-13 10:55:16 -05:00
user-guide.txt cpufreq: Update Documentation for cpus and related_cpus 2013-02-02 00:01:16 +01:00