<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/acpi/cppc_acpi.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-11-24T09:37:33Z</updated>
<entry>
<title>ACPI: CPPC: Limit perf ctrs in PCC check only to online CPUs</title>
<updated>2025-11-24T09:37:33Z</updated>
<author>
<name>Gautham R. Shenoy</name>
</author>
<published>2025-11-07T07:41:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ac54cc4da6343c6c600a21540f50902c77905722'/>
<id>urn:sha1:ac54cc4da6343c6c600a21540f50902c77905722</id>
<content type='text'>
[ Upstream commit 0fce75870666b46b700cfbd3216380b422f975da ]

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;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>ACPI: CPPC: Perform fast check switch only for online CPUs</title>
<updated>2025-11-24T09:37:32Z</updated>
<author>
<name>Gautham R. Shenoy</name>
</author>
<published>2025-11-07T07:41:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5a292e7f98759e9cdb4070c76f401b073d38eaf0'/>
<id>urn:sha1:5a292e7f98759e9cdb4070c76f401b073d38eaf0</id>
<content type='text'>
[ Upstream commit 8821c8e80a65bc4eb73daf63b34aac6b8ad69461 ]

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;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>ACPI: CPPC: Check _CPC validity for only the online CPUs</title>
<updated>2025-11-24T09:37:32Z</updated>
<author>
<name>Gautham R. Shenoy</name>
</author>
<published>2025-11-07T07:41:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c5ab402e60c819be5bd82315931cd5162efde1ae'/>
<id>urn:sha1:c5ab402e60c819be5bd82315931cd5162efde1ae</id>
<content type='text'>
[ Upstream commit 6dd3b8a709a130a4d55c866af9804c81b8486d28 ]

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;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>ACPI: CPPC: Fix NULL pointer dereference when nosmp is used</title>
<updated>2025-06-10T18:52:50Z</updated>
<author>
<name>Yunhui Cui</name>
</author>
<published>2025-06-04T02:30:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=15eece6c5b05e5f9db0711978c3e3b7f1a2cfe12'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>ACPI: CPPC: Add three functions related to autonomous selection</title>
<updated>2025-04-30T20:01:31Z</updated>
<author>
<name>Lifeng Zheng</name>
</author>
<published>2025-04-11T09:38:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f35e5b3ccfd3516bc36b08e101678b036309397c'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>ACPI: CPPC: Modify cppc_get_auto_sel_caps() to cppc_get_auto_sel()</title>
<updated>2025-04-30T20:01:31Z</updated>
<author>
<name>Lifeng Zheng</name>
</author>
<published>2025-04-11T09:38:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2605e4ab6615ef43361b18fc6d08dd884896aad8'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>ACPI: CPPC: Refactor register value get and set ABIs</title>
<updated>2025-04-30T20:01:31Z</updated>
<author>
<name>Lifeng Zheng</name>
</author>
<published>2025-04-11T09:38:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ab482f1bac6b128b8fe910b6663a4f74a3a9796c'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>ACPI: CPPC: Add cppc_set_reg_val()</title>
<updated>2025-04-30T20:01:30Z</updated>
<author>
<name>Lifeng Zheng</name>
</author>
<published>2025-04-11T09:38:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e05c75072c2eaa6e0b152a558b3be5cbcf79a587'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>ACPI: CPPC: Extract cppc_get_reg_val_in_pcc()</title>
<updated>2025-04-30T20:01:30Z</updated>
<author>
<name>Lifeng Zheng</name>
</author>
<published>2025-04-11T09:38:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b5ef45e6a1777fe4e857a1cd48631dc14064eae4'/>
<id>urn:sha1:b5ef45e6a1777fe4e857a1cd48631dc14064eae4</id>
<content type='text'>
Extract the operations if register is in pcc out from cppc_get_reg_val()
as cppc_get_reg_val_in_pcc().

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-5-zhenglifeng1@huawei.com
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>ACPI: CPPC: Rename cppc_get_perf() to cppc_get_reg_val()</title>
<updated>2025-04-30T20:01:30Z</updated>
<author>
<name>Lifeng Zheng</name>
</author>
<published>2025-04-11T09:38:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=714d103ce868cd0718d0e5262cbc76384a2eb03a'/>
<id>urn:sha1:714d103ce868cd0718d0e5262cbc76384a2eb03a</id>
<content type='text'>
Rename cppc_get_perf() to cppc_get_reg_val() as a generic function to
read CPPC registers.

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-4-zhenglifeng1@huawei.com
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
</feed>
