<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/drivers/acpi/cppc_acpi.c, branch v6.18</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>ACPI: CPPC: Limit perf ctrs in PCC check only to online CPUs</title>
<updated>2025-11-07T17:37:42+00:00</updated>
<author>
<name>Gautham R. Shenoy</name>
<email>gautham.shenoy@amd.com</email>
</author>
<published>2025-11-07T07:41:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=0fce75870666b46b700cfbd3216380b422f975da'/>
<id>0fce75870666b46b700cfbd3216380b422f975da</id>
<content type='text'>
per_cpu(cpc_desc_ptr, cpu) object is initialized for only the online
CPU via acpi_soft_cpu_online() --&gt; __acpi_processor_start() --&gt;
acpi_cppc_processor_probe().

However the function cppc_perf_ctrs_in_pcc() checks if the CPPC
perf-ctrs are in a PCC region for all the present CPUs, which breaks
when the kernel is booted with "nosmt=force".

Hence, limit the check only to the online CPUs.

Fixes: ae2df912d1a5 ("ACPI: CPPC: Disable FIE if registers in PCC regions")
Reviewed-by: "Mario Limonciello (AMD) (kernel.org)" &lt;superm1@kernel.org&gt;
Signed-off-by: Gautham R. Shenoy &lt;gautham.shenoy@amd.com&gt;
Link: https://patch.msgid.link/20251107074145.2340-5-gautham.shenoy@amd.com
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
per_cpu(cpc_desc_ptr, cpu) object is initialized for only the online
CPU via acpi_soft_cpu_online() --&gt; __acpi_processor_start() --&gt;
acpi_cppc_processor_probe().

However the function cppc_perf_ctrs_in_pcc() checks if the CPPC
perf-ctrs are in a PCC region for all the present CPUs, which breaks
when the kernel is booted with "nosmt=force".

Hence, limit the check only to the online CPUs.

Fixes: ae2df912d1a5 ("ACPI: CPPC: Disable FIE if registers in PCC regions")
Reviewed-by: "Mario Limonciello (AMD) (kernel.org)" &lt;superm1@kernel.org&gt;
Signed-off-by: Gautham R. Shenoy &lt;gautham.shenoy@amd.com&gt;
Link: https://patch.msgid.link/20251107074145.2340-5-gautham.shenoy@amd.com
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ACPI: CPPC: Perform fast check switch only for online CPUs</title>
<updated>2025-11-07T17:37:42+00:00</updated>
<author>
<name>Gautham R. Shenoy</name>
<email>gautham.shenoy@amd.com</email>
</author>
<published>2025-11-07T07:41:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=8821c8e80a65bc4eb73daf63b34aac6b8ad69461'/>
<id>8821c8e80a65bc4eb73daf63b34aac6b8ad69461</id>
<content type='text'>
per_cpu(cpc_desc_ptr, cpu) object is initialized for only the online
CPUs via acpi_soft_cpu_online() --&gt; __acpi_processor_start() --&gt;
acpi_cppc_processor_probe().

However the function cppc_allow_fast_switch() checks for the validity
of the _CPC object for all the present CPUs. This breaks when the
kernel is booted with "nosmt=force".

Check fast_switch capability only on online CPUs

Fixes: 15eece6c5b05 ("ACPI: CPPC: Fix NULL pointer dereference when nosmp is used")
Reviewed-by: "Mario Limonciello (AMD) (kernel.org)" &lt;superm1@kernel.org&gt;
Signed-off-by: Gautham R. Shenoy &lt;gautham.shenoy@amd.com&gt;
Link: https://patch.msgid.link/20251107074145.2340-4-gautham.shenoy@amd.com
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
per_cpu(cpc_desc_ptr, cpu) object is initialized for only the online
CPUs via acpi_soft_cpu_online() --&gt; __acpi_processor_start() --&gt;
acpi_cppc_processor_probe().

However the function cppc_allow_fast_switch() checks for the validity
of the _CPC object for all the present CPUs. This breaks when the
kernel is booted with "nosmt=force".

Check fast_switch capability only on online CPUs

Fixes: 15eece6c5b05 ("ACPI: CPPC: Fix NULL pointer dereference when nosmp is used")
Reviewed-by: "Mario Limonciello (AMD) (kernel.org)" &lt;superm1@kernel.org&gt;
Signed-off-by: Gautham R. Shenoy &lt;gautham.shenoy@amd.com&gt;
Link: https://patch.msgid.link/20251107074145.2340-4-gautham.shenoy@amd.com
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ACPI: CPPC: Check _CPC validity for only the online CPUs</title>
<updated>2025-11-07T17:37:42+00:00</updated>
<author>
<name>Gautham R. Shenoy</name>
<email>gautham.shenoy@amd.com</email>
</author>
<published>2025-11-07T07:41:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=6dd3b8a709a130a4d55c866af9804c81b8486d28'/>
<id>6dd3b8a709a130a4d55c866af9804c81b8486d28</id>
<content type='text'>
per_cpu(cpc_desc_ptr, cpu) object is initialized for only the online
CPUs via acpi_soft_cpu_online() --&gt; __acpi_processor_start() --&gt;
acpi_cppc_processor_probe().

However the function acpi_cpc_valid() checks for the validity of the
_CPC object for all the present CPUs. This breaks when the kernel is
booted with "nosmt=force".

Hence check the validity of the _CPC objects of only the online CPUs.

Fixes: 2aeca6bd0277 ("ACPI: CPPC: Check present CPUs for determining _CPC is valid")
Reported-by: Christopher Harris &lt;chris.harris79@gmail.com&gt;
Closes: https://lore.kernel.org/lkml/CAM+eXpdDT7KjLV0AxEwOLkSJ2QtrsvGvjA2cCHvt1d0k2_C4Cw@mail.gmail.com/
Suggested-by: Mario Limonciello &lt;mario.limonciello@amd.com&gt;
Reviewed-by: "Mario Limonciello (AMD) (kernel.org)" &lt;superm1@kernel.org&gt;
Tested-by: Chrisopher Harris &lt;chris.harris79@gmail.com&gt;
Signed-off-by: Gautham R. Shenoy &lt;gautham.shenoy@amd.com&gt;
Link: https://patch.msgid.link/20251107074145.2340-3-gautham.shenoy@amd.com
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
per_cpu(cpc_desc_ptr, cpu) object is initialized for only the online
CPUs via acpi_soft_cpu_online() --&gt; __acpi_processor_start() --&gt;
acpi_cppc_processor_probe().

However the function acpi_cpc_valid() checks for the validity of the
_CPC object for all the present CPUs. This breaks when the kernel is
booted with "nosmt=force".

Hence check the validity of the _CPC objects of only the online CPUs.

Fixes: 2aeca6bd0277 ("ACPI: CPPC: Check present CPUs for determining _CPC is valid")
Reported-by: Christopher Harris &lt;chris.harris79@gmail.com&gt;
Closes: https://lore.kernel.org/lkml/CAM+eXpdDT7KjLV0AxEwOLkSJ2QtrsvGvjA2cCHvt1d0k2_C4Cw@mail.gmail.com/
Suggested-by: Mario Limonciello &lt;mario.limonciello@amd.com&gt;
Reviewed-by: "Mario Limonciello (AMD) (kernel.org)" &lt;superm1@kernel.org&gt;
Tested-by: Chrisopher Harris &lt;chris.harris79@gmail.com&gt;
Signed-off-by: Gautham R. Shenoy &lt;gautham.shenoy@amd.com&gt;
Link: https://patch.msgid.link/20251107074145.2340-3-gautham.shenoy@amd.com
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ACPI: CPPC: Fix typo in a comment</title>
<updated>2025-11-03T16:25:42+00:00</updated>
<author>
<name>Chu Guangqing</name>
<email>chuguangqing@inspur.com</email>
</author>
<published>2025-10-31T05:52:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=1642fabff19f768e9a8fea85d55a2d6d43ecffe3'/>
<id>1642fabff19f768e9a8fea85d55a2d6d43ecffe3</id>
<content type='text'>
Fix spelling from "pachage" to "package".

Signed-off-by: Chu Guangqing &lt;chuguangqing@inspur.com&gt;
[ rjw: Changelog and subject edits ]
Link: https://patch.msgid.link/20251031055240.2791-1-chuguangqing@inspur.com
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix spelling from "pachage" to "package".

Signed-off-by: Chu Guangqing &lt;chuguangqing@inspur.com&gt;
[ rjw: Changelog and subject edits ]
Link: https://patch.msgid.link/20251031055240.2791-1-chuguangqing@inspur.com
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ACPI: CPPC: Do not use CPUFREQ_ETERNAL as an error value</title>
<updated>2025-10-01T11:57:13+00:00</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2025-09-26T10:29:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=c28a280bd465690981099cd6e43dfcfa5c28b133'/>
<id>c28a280bd465690981099cd6e43dfcfa5c28b133</id>
<content type='text'>
Instead of using CPUFREQ_ETERNAL for signaling an error condition
in cppc_get_transition_latency(), change the return value type of
that function to int and make it return a proper negative error
code on failures.

No intentional functional impact.

Reviewed-by: Mario Limonciello (AMD) &lt;superm1@kernel.org&gt;
Reviewed-by: Jie Zhan &lt;zhanjie9@hisilicon.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Acked-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Reviewed-by: Qais Yousef &lt;qyousef@layalina.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Instead of using CPUFREQ_ETERNAL for signaling an error condition
in cppc_get_transition_latency(), change the return value type of
that function to int and make it return a proper negative error
code on failures.

No intentional functional impact.

Reviewed-by: Mario Limonciello (AMD) &lt;superm1@kernel.org&gt;
Reviewed-by: Jie Zhan &lt;zhanjie9@hisilicon.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Acked-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Reviewed-by: Qais Yousef &lt;qyousef@layalina.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ACPI: CPPC: Fix NULL pointer dereference when nosmp is used</title>
<updated>2025-06-10T18:52:50+00:00</updated>
<author>
<name>Yunhui Cui</name>
<email>cuiyunhui@bytedance.com</email>
</author>
<published>2025-06-04T02:30:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=15eece6c5b05e5f9db0711978c3e3b7f1a2cfe12'/>
<id>15eece6c5b05e5f9db0711978c3e3b7f1a2cfe12</id>
<content type='text'>
With nosmp in cmdline, other CPUs are not brought up, leaving
their cpc_desc_ptr NULL. CPU0's iteration via for_each_possible_cpu()
dereferences these NULL pointers, causing panic.

Panic backtrace:

[    0.401123] Unable to handle kernel NULL pointer dereference at virtual address 00000000000000b8
...
[    0.403255] [&lt;ffffffff809a5818&gt;] cppc_allow_fast_switch+0x6a/0xd4
...
Kernel panic - not syncing: Attempted to kill init!

Fixes: 3cc30dd00a58 ("cpufreq: CPPC: Enable fast_switch")
Reported-by: Xu Lu &lt;luxu.kernel@bytedance.com&gt;
Signed-off-by: Yunhui Cui &lt;cuiyunhui@bytedance.com&gt;
Link: https://patch.msgid.link/20250604023036.99553-1-cuiyunhui@bytedance.com
[ rjw: New subject ]
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With nosmp in cmdline, other CPUs are not brought up, leaving
their cpc_desc_ptr NULL. CPU0's iteration via for_each_possible_cpu()
dereferences these NULL pointers, causing panic.

Panic backtrace:

[    0.401123] Unable to handle kernel NULL pointer dereference at virtual address 00000000000000b8
...
[    0.403255] [&lt;ffffffff809a5818&gt;] cppc_allow_fast_switch+0x6a/0xd4
...
Kernel panic - not syncing: Attempted to kill init!

Fixes: 3cc30dd00a58 ("cpufreq: CPPC: Enable fast_switch")
Reported-by: Xu Lu &lt;luxu.kernel@bytedance.com&gt;
Signed-off-by: Yunhui Cui &lt;cuiyunhui@bytedance.com&gt;
Link: https://patch.msgid.link/20250604023036.99553-1-cuiyunhui@bytedance.com
[ rjw: New subject ]
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ACPI: CPPC: Add three functions related to autonomous selection</title>
<updated>2025-04-30T20:01:31+00:00</updated>
<author>
<name>Lifeng Zheng</name>
<email>zhenglifeng1@huawei.com</email>
</author>
<published>2025-04-11T09:38:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=f35e5b3ccfd3516bc36b08e101678b036309397c'/>
<id>f35e5b3ccfd3516bc36b08e101678b036309397c</id>
<content type='text'>
cppc_set_epp() - write energy performance preference register value,
based on ACPI 6.5, s8.4.6.1.7

cppc_get_auto_act_window() - read autonomous activity window register
value, based on ACPI 6.5, s8.4.6.1.6

cppc_set_auto_act_window() - write autonomous activity window register
value, based on ACPI 6.5, s8.4.6.1.6

Reviewed-by: Pierre Gondois &lt;pierre.gondois@arm.com&gt;
Signed-off-by: Lifeng Zheng &lt;zhenglifeng1@huawei.com&gt;
Reviewed-by: Mario Limonciello &lt;mario.limonciello@amd.com&gt;
Link: https://patch.msgid.link/20250411093855.982491-9-zhenglifeng1@huawei.com
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
cppc_set_epp() - write energy performance preference register value,
based on ACPI 6.5, s8.4.6.1.7

cppc_get_auto_act_window() - read autonomous activity window register
value, based on ACPI 6.5, s8.4.6.1.6

cppc_set_auto_act_window() - write autonomous activity window register
value, based on ACPI 6.5, s8.4.6.1.6

Reviewed-by: Pierre Gondois &lt;pierre.gondois@arm.com&gt;
Signed-off-by: Lifeng Zheng &lt;zhenglifeng1@huawei.com&gt;
Reviewed-by: Mario Limonciello &lt;mario.limonciello@amd.com&gt;
Link: https://patch.msgid.link/20250411093855.982491-9-zhenglifeng1@huawei.com
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ACPI: CPPC: Modify cppc_get_auto_sel_caps() to cppc_get_auto_sel()</title>
<updated>2025-04-30T20:01:31+00:00</updated>
<author>
<name>Lifeng Zheng</name>
<email>zhenglifeng1@huawei.com</email>
</author>
<published>2025-04-11T09:38:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=2605e4ab6615ef43361b18fc6d08dd884896aad8'/>
<id>2605e4ab6615ef43361b18fc6d08dd884896aad8</id>
<content type='text'>
Modify cppc_get_auto_sel_caps() to cppc_get_auto_sel(). Using a
cppc_perf_caps to carry the value is unnecessary.

Add a check to ensure the pointer 'enable' is not null.

Reviewed-by: Pierre Gondois &lt;pierre.gondois@arm.com&gt;
Signed-off-by: Lifeng Zheng &lt;zhenglifeng1@huawei.com&gt;
Reviewed-by: Mario Limonciello &lt;mario.limonciello@amd.com&gt;
Link: https://patch.msgid.link/20250411093855.982491-8-zhenglifeng1@huawei.com
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Modify cppc_get_auto_sel_caps() to cppc_get_auto_sel(). Using a
cppc_perf_caps to carry the value is unnecessary.

Add a check to ensure the pointer 'enable' is not null.

Reviewed-by: Pierre Gondois &lt;pierre.gondois@arm.com&gt;
Signed-off-by: Lifeng Zheng &lt;zhenglifeng1@huawei.com&gt;
Reviewed-by: Mario Limonciello &lt;mario.limonciello@amd.com&gt;
Link: https://patch.msgid.link/20250411093855.982491-8-zhenglifeng1@huawei.com
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ACPI: CPPC: Refactor register value get and set ABIs</title>
<updated>2025-04-30T20:01:31+00:00</updated>
<author>
<name>Lifeng Zheng</name>
<email>zhenglifeng1@huawei.com</email>
</author>
<published>2025-04-11T09:38:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=ab482f1bac6b128b8fe910b6663a4f74a3a9796c'/>
<id>ab482f1bac6b128b8fe910b6663a4f74a3a9796c</id>
<content type='text'>
Refactor register value get and set ABIs by using cppc_get_reg_val(),
cppc_set_reg_val() and CPPC_REG_VAL_READ().

Reviewed-by: Pierre Gondois &lt;pierre.gondois@arm.com&gt;
Signed-off-by: Lifeng Zheng &lt;zhenglifeng1@huawei.com&gt;
Reviewed-by: Mario Limonciello &lt;mario.limonciello@amd.com&gt;
Link: https://patch.msgid.link/20250411093855.982491-7-zhenglifeng1@huawei.com
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Refactor register value get and set ABIs by using cppc_get_reg_val(),
cppc_set_reg_val() and CPPC_REG_VAL_READ().

Reviewed-by: Pierre Gondois &lt;pierre.gondois@arm.com&gt;
Signed-off-by: Lifeng Zheng &lt;zhenglifeng1@huawei.com&gt;
Reviewed-by: Mario Limonciello &lt;mario.limonciello@amd.com&gt;
Link: https://patch.msgid.link/20250411093855.982491-7-zhenglifeng1@huawei.com
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ACPI: CPPC: Add cppc_set_reg_val()</title>
<updated>2025-04-30T20:01:30+00:00</updated>
<author>
<name>Lifeng Zheng</name>
<email>zhenglifeng1@huawei.com</email>
</author>
<published>2025-04-11T09:38:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=e05c75072c2eaa6e0b152a558b3be5cbcf79a587'/>
<id>e05c75072c2eaa6e0b152a558b3be5cbcf79a587</id>
<content type='text'>
Add cppc_set_reg_val() as a generic function for setting CPPC register
values, with this features:

 1. Check register. If a register is writeable, it must be a buffer and
    can not be null.

 2. Extract the operations if register is in PCC out as
    cppc_set_reg_val_in_pcc().

This function can be used to reduce some existing code duplication.

Reviewed-by: Pierre Gondois &lt;pierre.gondois@arm.com&gt;
Signed-off-by: Lifeng Zheng &lt;zhenglifeng1@huawei.com&gt;
Reviewed-by: Mario Limonciello &lt;mario.limonciello@amd.com&gt;
Link: https://patch.msgid.link/20250411093855.982491-6-zhenglifeng1@huawei.com
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add cppc_set_reg_val() as a generic function for setting CPPC register
values, with this features:

 1. Check register. If a register is writeable, it must be a buffer and
    can not be null.

 2. Extract the operations if register is in PCC out as
    cppc_set_reg_val_in_pcc().

This function can be used to reduce some existing code duplication.

Reviewed-by: Pierre Gondois &lt;pierre.gondois@arm.com&gt;
Signed-off-by: Lifeng Zheng &lt;zhenglifeng1@huawei.com&gt;
Reviewed-by: Mario Limonciello &lt;mario.limonciello@amd.com&gt;
Link: https://patch.msgid.link/20250411093855.982491-6-zhenglifeng1@huawei.com
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
