<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/cpufreq/cppc_cpufreq.c, branch linux-6.17.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.17.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.17.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2025-10-19T14:37:24Z</updated>
<entry>
<title>cpufreq: CPPC: Avoid using CPUFREQ_ETERNAL as transition delay</title>
<updated>2025-10-19T14:37:24Z</updated>
<author>
<name>Rafael J. Wysocki</name>
</author>
<published>2025-09-26T10:19:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=777397e7860a8f7dc654838f0139e32d54f45009'/>
<id>urn:sha1:777397e7860a8f7dc654838f0139e32d54f45009</id>
<content type='text'>
commit f965d111e68f4a993cc44d487d416e3d954eea11 upstream.

If cppc_get_transition_latency() returns CPUFREQ_ETERNAL to indicate a
failure to retrieve the transition latency value from the platform
firmware, the CPPC cpufreq driver will use that value (converted to
microseconds) as the policy transition delay, but it is way too large
for any practical use.

Address this by making the driver use the cpufreq's default
transition latency value (in microseconds) as the transition delay
if CPUFREQ_ETERNAL is returned by cppc_get_transition_latency().

Fixes: d4f3388afd48 ("cpufreq / CPPC: Set platform specific transition_delay_us")
Cc: 5.19+ &lt;stable@vger.kernel.org&gt; # 5.19
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Reviewed-by: Mario Limonciello (AMD) &lt;superm1@kernel.org&gt;
Reviewed-by: Jie Zhan &lt;zhanjie9@hisilicon.com&gt;
Acked-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Reviewed-by: Qais Yousef &lt;qyousef@layalina.io&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>cpufreq: CPPC: Mark driver with NEED_UPDATE_LIMITS flag</title>
<updated>2025-07-22T10:13:12Z</updated>
<author>
<name>Prashant Malani</name>
</author>
<published>2025-07-22T05:55:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0a1416a49e63c320f6e6c1c8d07e1b58c0d4a3f3'/>
<id>urn:sha1:0a1416a49e63c320f6e6c1c8d07e1b58c0d4a3f3</id>
<content type='text'>
AMU counters on certain CPPC-based platforms tend to yield inaccurate
delivered performance measurements on systems that are idle/mostly idle.
This results in an inaccurate frequency being stored by cpufreq in its
policy structure when the CPU is brought online. [1]

Consequently, if the userspace governor tries to set the frequency to a
new value, there is a possibility that it would be the erroneous value
stored earlier. In such a scenario, cpufreq would assume that the
requested frequency has already been set and return early, resulting in
the correct/new frequency request never making it to the hardware.

Since the operating frequency is liable to this sort of inconsistency,
mark the CPPC driver with CPUFREQ_NEED_UPDATE_LIMITS so that it is always
invoked when a target frequency update is requested.

Link: https://lore.kernel.org/linux-pm/20250619000925.415528-3-pmalani@google.com/ [1]
Suggested-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Signed-off-by: Prashant Malani &lt;pmalani@google.com&gt;
Acked-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Link: https://patch.msgid.link/20250722055611.130574-2-pmalani@google.com
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>cpufreq: CPPC: Remove forward declaration of cppc_cpufreq_register_em()</title>
<updated>2025-06-18T19:03:52Z</updated>
<author>
<name>Lifeng Zheng</name>
</author>
<published>2025-05-26T11:30:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c83a92df2fc60bf0b3130cdf0bc2104d61750317'/>
<id>urn:sha1:c83a92df2fc60bf0b3130cdf0bc2104d61750317</id>
<content type='text'>
cppc_cpufreq_register_em() is only used in populate_efficiency_class(). A
forward declaration of it is not necessary.

Move cppc_cpufreq_register_em() in front of populate_efficiency_class()
and remove the forward declaration of cppc_cpufreq_register_em().

No functional change.

Signed-off-by: Lifeng Zheng &lt;zhenglifeng1@huawei.com&gt;
Link: https://patch.msgid.link/20250526113057.3086513-4-zhenglifeng1@huawei.com
[ rjw: Changelog edits ]
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>cpufreq: CPPC: Do not return a value from populate_efficiency_class()</title>
<updated>2025-06-18T19:03:52Z</updated>
<author>
<name>Lifeng Zheng</name>
</author>
<published>2025-05-26T11:30:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3d5978ea6cbc4df192d0ea1800ef5d55b28b965e'/>
<id>urn:sha1:3d5978ea6cbc4df192d0ea1800ef5d55b28b965e</id>
<content type='text'>
The return value of populate_efficiency_class() is never needed and the
result of it doesn't affect the initialization of cppc_cpufreq.

It makes more sense to change it into a void function.

Signed-off-by: Lifeng Zheng &lt;zhenglifeng1@huawei.com&gt;
Link: https://patch.msgid.link/20250526113057.3086513-3-zhenglifeng1@huawei.com
[ rjw: Subject and changelog edits ]
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>cpufreq: CPPC: Remove cpu_data_list</title>
<updated>2025-06-18T19:03:52Z</updated>
<author>
<name>Lifeng Zheng</name>
</author>
<published>2025-05-26T11:30:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d80a75624051b817043431f847470fb4680f2582'/>
<id>urn:sha1:d80a75624051b817043431f847470fb4680f2582</id>
<content type='text'>
After commit a28b2bfc099c ("cppc_cpufreq: replace per-cpu data array with a
list"), cpu_data can be got from policy-&gt;driver_data, so cpu_data_list is
not actually needed and can be removed.

Signed-off-by: Lifeng Zheng &lt;zhenglifeng1@huawei.com&gt;
Link: https://patch.msgid.link/20250526113057.3086513-2-zhenglifeng1@huawei.com
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>cpufreq: CPPC: Add support for autonomous selection</title>
<updated>2025-05-21T20:47:44Z</updated>
<author>
<name>Lifeng Zheng</name>
</author>
<published>2025-05-07T03:19:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=922607a2b462b813c4b461feca04aed0c97d4cfe'/>
<id>urn:sha1:922607a2b462b813c4b461feca04aed0c97d4cfe</id>
<content type='text'>
Add sysfs interfaces for CPPC autonomous selection in the cppc_cpufreq
driver.

Signed-off-by: Lifeng Zheng &lt;zhenglifeng1@huawei.com&gt;
Reviewed-by: Sumit Gupta &lt;sumitg@nvidia.com&gt;
Acked-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Link: https://patch.msgid.link/20250507031941.2812701-1-zhenglifeng1@huawei.com
[ rjw: Subject edits ]
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>cpufreq: cppc: Fix invalid return value in .get() callback</title>
<updated>2025-04-16T08:07:44Z</updated>
<author>
<name>Marc Zyngier</name>
</author>
<published>2025-04-13T10:11:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2b8e6b58889c672e1ae3601d9b2b070be4dc2fbc'/>
<id>urn:sha1:2b8e6b58889c672e1ae3601d9b2b070be4dc2fbc</id>
<content type='text'>
Returning a negative error code in a function with an unsigned
return type is a pretty bad idea. It is probably worse when the
justification for the change is "our static analisys tool found it".

Fixes: cf7de25878a1 ("cppc_cpufreq: Fix possible null pointer dereference")
Signed-off-by: Marc Zyngier &lt;maz@kernel.org&gt;
Cc: "Rafael J. Wysocki" &lt;rafael@kernel.org&gt;
Cc: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Reviewed-by: Lifeng Zheng &lt;zhenglifeng1@huawei.com&gt;
Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
</content>
</entry>
<entry>
<title>cpufreq: cppc: Set policy-&gt;boost_supported</title>
<updated>2025-02-07T04:15:15Z</updated>
<author>
<name>Viresh Kumar</name>
</author>
<published>2025-01-23T08:40:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a3f48fb2e5b7db23b4bc5c699baf67c18b50ab4b'/>
<id>urn:sha1:a3f48fb2e5b7db23b4bc5c699baf67c18b50ab4b</id>
<content type='text'>
With a later commit, the cpufreq core will call the -&gt;set_boost()
callback only if the policy supports boost frequency. The
boost_supported flag is set by the cpufreq core if policy-&gt;freq_table is
set and one or more boost frequencies are present.

For other drivers, the flag must be set explicitly.

With this, the local variable boost_supported isn't required anymore.

Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
</content>
</entry>
<entry>
<title>cpufreq: CPPC: Fix wrong max_freq in policy initialization</title>
<updated>2025-01-23T20:06:33Z</updated>
<author>
<name>Lifeng Zheng</name>
</author>
<published>2025-01-17T10:14:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=03d8b4e76266e11662c5e544854b737843173e2d'/>
<id>urn:sha1:03d8b4e76266e11662c5e544854b737843173e2d</id>
<content type='text'>
In policy initialization, policy-&gt;max and policy-&gt;cpuinfo.max_freq are
always set to the value calculated from caps-&gt;nominal_perf.

This will cause the frequency stay on base frequency even if the policy
is already boosted when a CPU is going online.

Fix this by using policy-&gt;boost_enabled to determine which value should
be set.

Signed-off-by: Lifeng Zheng &lt;zhenglifeng1@huawei.com&gt;
Acked-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Link: https://patch.msgid.link/20250117101457.1530653-4-zhenglifeng1@huawei.com
[ rjw: Changelog edits ]
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>treewide: Introduce kthread_run_worker[_on_cpu]()</title>
<updated>2025-01-08T17:15:03Z</updated>
<author>
<name>Frederic Weisbecker</name>
</author>
<published>2024-09-26T22:49:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b04e317b522630b46f78ee62ecbdc5734e8d43de'/>
<id>urn:sha1:b04e317b522630b46f78ee62ecbdc5734e8d43de</id>
<content type='text'>
kthread_create() creates a kthread without running it yet. kthread_run()
creates a kthread and runs it.

On the other hand, kthread_create_worker() creates a kthread worker and
runs it.

This difference in behaviours is confusing. Also there is no way to
create a kthread worker and affine it using kthread_bind_mask() or
kthread_affine_preferred() before starting it.

Consolidate the behaviours and introduce kthread_run_worker[_on_cpu]()
that behaves just like kthread_run(). kthread_create_worker[_on_cpu]()
will now only create a kthread worker without starting it.

Signed-off-by: Frederic Weisbecker &lt;frederic@kernel.org&gt;
Signed-off-by: Dan Carpenter &lt;dan.carpenter@linaro.org&gt;
</content>
</entry>
</feed>
