<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/cpufreq/cppc_cpufreq.c, branch v4.17.1</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v4.17.1</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v4.17.1'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2018-04-30T08:14:08+00:00</updated>
<entry>
<title>cpufreq / CPPC: Set platform specific transition_delay_us</title>
<updated>2018-04-30T08:14:08+00:00</updated>
<author>
<name>Prashanth Prakash</name>
<email>pprakash@codeaurora.org</email>
</author>
<published>2018-04-27T17:35:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d4f3388afd488ed15368fa7413b8bd6d1f98bb1d'/>
<id>urn:sha1:d4f3388afd488ed15368fa7413b8bd6d1f98bb1d</id>
<content type='text'>
Add support to specify platform specific transition_delay_us instead
of using the transition delay derived from PCC.

With commit 3d41386d556d (cpufreq: CPPC: Use transition_delay_us
depending transition_latency) we are setting transition_delay_us
directly and not applying the LATENCY_MULTIPLIER. Because of that,
on Qualcomm Centriq we can end up with a very high rate of frequency
change requests when using the schedutil governor (default
rate_limit_us=10 compared to an earlier value of 10000).

The PCC subspace describes the rate at which the platform can accept
commands on the CPPC's PCC channel. This includes read and write
command on the PCC channel that can be used for reasons other than
frequency transitions. Moreover the same PCC subspace can be used by
multiple freq domains and deriving transition_delay_us from it as we
do now can be sub-optimal.

Moreover if a platform does not use PCC for desired_perf register then
there is no way to compute the transition latency or the delay_us.

CPPC does not have a standard defined mechanism to get the transition
rate or the latency at the moment.

Given the above limitations, it is simpler to have a platform specific
transition_delay_us and rely on PCC derived value only if a platform
specific value is not available.

Signed-off-by: Prashanth Prakash &lt;pprakash@codeaurora.org&gt;
Cc: 4.14+ &lt;stable@vger.kernel.org&gt; # 4.14+
Fixes: 3d41386d556d (cpufreq: CPPC: Use transition_delay_us depending transition_latency)
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>cpufreq: CPPC: Initialize shared perf capabilities of CPUs</title>
<updated>2018-04-10T06:38:02+00:00</updated>
<author>
<name>Shunyong Yang</name>
<email>shunyong.yang@hxt-semitech.com</email>
</author>
<published>2018-04-06T02:43:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8913315e9459b146e5888ab5138e10daa061b885'/>
<id>urn:sha1:8913315e9459b146e5888ab5138e10daa061b885</id>
<content type='text'>
When multiple CPUs are related in one cpufreq policy, the first online
CPU will be chosen by default to handle cpufreq operations. Let's take
cpu0 and cpu1 as an example.

When cpu0 is offline, policy-&gt;cpu will be shifted to cpu1. cpu1's perf
capabilities should be initialized. Otherwise, perf capabilities are 0s
and speed change can not take effect.

This patch copies perf capabilities of the first online CPU to other
shared CPUs when policy shared type is CPUFREQ_SHARED_TYPE_ANY.

Acked-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Signed-off-by: Shunyong Yang &lt;shunyong.yang@hxt-semitech.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>cpufreq: CPPC: Don't set transition_latency</title>
<updated>2018-04-10T06:38:02+00:00</updated>
<author>
<name>Viresh Kumar</name>
<email>viresh.kumar@linaro.org</email>
</author>
<published>2018-04-02T07:20:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b8b10bc2015cd91350aac68447377c8410a48865'/>
<id>urn:sha1:b8b10bc2015cd91350aac68447377c8410a48865</id>
<content type='text'>
Now that the driver has started to set transition_delay_us directly,
there is no need to set transition_latency along with it, as it is not
used by the cpufreq core.

Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>cpufreq: CPPC: Use transition_delay_us depending transition_latency</title>
<updated>2018-03-30T10:15:58+00:00</updated>
<author>
<name>George Cherian</name>
<email>george.cherian@cavium.com</email>
</author>
<published>2018-03-23T10:30:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3d41386d556db9f720e00de3e11e45f39cb5071c'/>
<id>urn:sha1:3d41386d556db9f720e00de3e11e45f39cb5071c</id>
<content type='text'>
With commit e948bc8fbee0 (cpufreq: Cap the default transition delay
value to 10 ms)  the cpufreq was not honouring the delay passed via
ACPI (PCCT). Due to which on ARM based platforms using CPPC the
cpufreq governor tries to change the frequency of CPUs faster than
expected.

This leads to continuous error messages like the following.
" ACPI CPPC: PCC check channel failed. Status=0 "

Earlier (without above commit) the default transition delay was
taken form the value passed from PCCT. Use the same value provided
by PCCT to set the transition_delay_us.

Fixes: e948bc8fbee0 (cpufreq: Cap the default transition delay value to 10 ms)
Signed-off-by: George Cherian &lt;george.cherian@cavium.com&gt;
Cc: 4.14+ &lt;stable@vger.kernel.org&gt; # 4.14+
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>cpufreq: cppc_cpufreq: Fix cppc_cpufreq_init() failure path</title>
<updated>2018-03-20T09:52:31+00:00</updated>
<author>
<name>Chunyu Hu</name>
<email>chuhu@redhat.com</email>
</author>
<published>2018-03-05T05:40:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=55b55abc17f238c61921360e61dde90dd9a326d1'/>
<id>urn:sha1:55b55abc17f238c61921360e61dde90dd9a326d1</id>
<content type='text'>
Kmemleak reported the below leak. When cppc_cpufreq_init went into
failure path, the cpu mask is not freed. After fix, this report is
gone. And to avaoid potential NULL pointer reference, check the cpu
value first.

unreferenced object 0xffff800fd5ea4880 (size 128):
  comm "swapper/0", pid 1, jiffies 4294939510 (age 668.680s)
  hex dump (first 32 bytes):
    00 00 00 00 20 00 00 00 00 00 00 00 00 00 00 00  .... ...........
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [&lt;ffff0000082c4ae4&gt;] __kmalloc_node+0x278/0x634
    [&lt;ffff0000088f4a74&gt;] alloc_cpumask_var_node+0x28/0x60
    [&lt;ffff0000088f4af0&gt;] zalloc_cpumask_var+0x14/0x1c
    [&lt;ffff000008d20254&gt;] cppc_cpufreq_init+0xd0/0x19c
    [&lt;ffff000008083828&gt;] do_one_initcall+0xec/0x15c
    [&lt;ffff000008cd1018&gt;] kernel_init_freeable+0x1f4/0x2a4
    [&lt;ffff0000089099b0&gt;] kernel_init+0x18/0x10c
    [&lt;ffff000008084d50&gt;] ret_from_fork+0x10/0x18
    [&lt;ffffffffffffffff&gt;] 0xffffffffffffffff

Signed-off-by: Chunyu Hu &lt;chuhu@redhat.com&gt;
Acked-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>cpufreq: remove setting of policy-&gt;cpu in policy-&gt;cpus during init</title>
<updated>2017-08-17T23:41:37+00:00</updated>
<author>
<name>Sudeep Holla</name>
<email>Sudeep.Holla@arm.com</email>
</author>
<published>2017-08-10T14:58:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b20a3f3d8a3516dcde2d1fb130169f336bc93023'/>
<id>urn:sha1:b20a3f3d8a3516dcde2d1fb130169f336bc93023</id>
<content type='text'>
policy-&gt;cpu is copied into policy-&gt;cpus in cpufreq_online() before
calling into cpufreq_driver-&gt;init(). So there's no need to set the
same in the individual driver init() functions again.

This patch removes the redundant setting of policy-&gt;cpu in policy-&gt;cpus
in intel_pstate and cppc drivers.

Reported-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Signed-off-by: Sudeep Holla &lt;sudeep.holla@arm.com&gt;
Acked-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>cpufreq / CPPC: Initialize policy-&gt;min to lowest nonlinear performance</title>
<updated>2017-06-27T00:19:39+00:00</updated>
<author>
<name>Prakash, Prashanth</name>
<email>pprakash@codeaurora.org</email>
</author>
<published>2017-05-11T22:39:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=73808d0fd26b3d3f0f44cc7c469ad1d3c1b570b8'/>
<id>urn:sha1:73808d0fd26b3d3f0f44cc7c469ad1d3c1b570b8</id>
<content type='text'>
Description of Lowest Perfomance in ACPI 6.1 specification states:
"Lowest Performance is the absolute lowest performance level of
the platform. Selecting a performance level lower than the lowest
nonlinear performance level may actually cause an efficiency penalty,
but should reduce the instantaneous power consumption of the processor.
In traditional terms, this represents the T-state range of performance
levels."

Set the default value of policy-&gt;min to Lowest Nonlinear Performance
to avoid any potential efficiency penalty.

Signed-off-by: Prashanth Prakash &lt;pprakash@codeaurora.org&gt;
Acked-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Acked-by: Alexey Klimov &lt;alexey.klimov@arm.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>cpufreq / CPPC: Add MODULE_DEVICE_TABLE for cppc_cpufreq driver</title>
<updated>2016-10-21T13:11:23+00:00</updated>
<author>
<name>Prakash, Prashanth</name>
<email>pprakash@codeaurora.org</email>
</author>
<published>2016-10-14T18:00:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=974f86498ed28d86575cd2327bd83e53abd872da'/>
<id>urn:sha1:974f86498ed28d86575cd2327bd83e53abd872da</id>
<content type='text'>
MODULE_DEVICE_TABLE is added so that CPPC cpufreq module can be
automatically loaded when we have a acpi processor device with
"ACPI0007" hid.

Signed-off-by: Prashanth Prakash &lt;pprakash@codeaurora.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'pm-extra-4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm</title>
<updated>2016-10-14T19:46:13+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2016-10-14T19:46:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ef98988ba369da88bab8a4d457407e71bbe160fa'/>
<id>urn:sha1:ef98988ba369da88bab8a4d457407e71bbe160fa</id>
<content type='text'>
Pull more power management updates from Rafael Wysocki:
 "This includes a couple of fixes for cpufreq regressions introduced in
  4.8, a rework of the intel_pstate algorithm used on Atom processors
  (that took some time to test) plus a fix and a couple of cleanups in
  that driver, a CPPC cpufreq driver fix, and a some devfreq fixes and
  cleanups (core and exynos-nocp).

  Specifics:

   - Fix two cpufreq regressions causing undesirable changes in behavior
     to appear (one in the core and one in the conservative governor)
     introduced during the 4.8 cycle (Aaro Koskinen, Rafael Wysocki).

   - Fix the way the intel_pstate driver accesses MSRs related to the
     hardware-managed P-states (HWP) feature during the initialization
     which currently is unsafe and may cause the processor to generate a
     general protection fault (Srinivas Pandruvada).

   - Rework the intel_pstate's P-state selection algorithm used on Atom
     processors to avoid known problems with the current one and to make
     the computation more straightforward, which also happens to improve
     performance in multiple benchmarks a bit (Rafael Wysocki).

   - Improve two comments in the intel_pstate driver (Rafael Wysocki).

   - Fix the desired performance computation in the CPPC cpufreq driver
     (Hoan Tran).

   - Fix the devfreq core to avoid printing misleading error messages in
     some cases (Tobias Jakobi).

   - Fix the error code path in devfreq_add_device() to use proper
     locking around list modifications (Axel Lin).

   - Fix a build failure and remove a couple of redundant updates of
     variables in the exynos-nocp devfreq driver (Axel Lin)"

* tag 'pm-extra-4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  cpufreq: CPPC: Correct desired_perf calculation
  cpufreq: conservative: Fix next frequency selection
  cpufreq: skip invalid entries when searching the frequency
  cpufreq: intel_pstate: Fix struct pstate_adjust_policy kerneldoc
  cpufreq: intel_pstate: Proportional algorithm for Atom
  PM / devfreq: Skip status update on uninitialized previous_freq
  PM / devfreq: Add proper locking around list_del()
  PM / devfreq: exynos-nocp: Remove redundant code
  PM / devfreq: exynos-nocp: Select REGMAP_MMIO
  cpufreq: intel_pstate: Clarify comment in get_target_pstate_use_performance()
  cpufreq: intel_pstate: Fix unsafe HWP MSR access
</content>
</entry>
<entry>
<title>cpufreq: CPPC: Correct desired_perf calculation</title>
<updated>2016-10-13T21:10:41+00:00</updated>
<author>
<name>Hoan Tran</name>
<email>hotran@apm.com</email>
</author>
<published>2016-10-13T17:33:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c197d758036d8c77923ae3f88571cf198283107e'/>
<id>urn:sha1:c197d758036d8c77923ae3f88571cf198283107e</id>
<content type='text'>
The desired_perf is an abstract performance number. Its value should
be in the range of [lowest perf, highest perf] of CPPC.
The correct calculation is
  desired_perf = freq * cppc_highest_perf / cppc_dmi_max_khz

And cppc_cpufreq_set_target() returns if desired_perf is exactly
the same with the old perf.

Signed-off-by: Hoan Tran &lt;hotran@apm.com&gt;
Reviewed-by: Prashanth Prakash &lt;pprakash@codeaurora.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
</feed>
