Re: [GIT PULL] Urgent ACPI support fix for v6.18
From: lihuisong (C)
Date: Tue Dec 09 2025 - 02:29:48 EST
在 2025/11/28 3:03, Longia, Amandeep Kaur 写道:
Hi all,
On 11/27/2025 7:39 AM, lihuisong (C) wrote:
Hello Rafael,
在 2025/11/26 20:54, Rafael J. Wysocki 写道:
Hi Linus,
Please pull from the tag
git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
acpi-6.18-rc8
with top-most commit 43ff36c4a5a574ee83b4b0d3f3d74f09a3a8c2d3
Revert "ACPI: processor: idle: Optimize ACPI idle driver
registration"
on top of commit ac3fd01e4c1efce8f2c054cdeb2ddd2fc0fb150d
Linux 6.18-rc7
to receive an urgent ACPI support fix for 6.18.
This reverts a commit that attempted to make the code in the ACPI
processor driver more straightforward, but it turned out to cause
the kernel to crash on at least one system, along with some further
cleanups on top of it.
I just found that "ACPI: processor: idle: Optimize ACPI idle driver
registration" depends on the change
about cpuhp_setup_state in the commit [1]. Or many CPUs don't create
cpuidle directory.
What is the crash? Do you have releated trace?
[1] https://lore.kernel.org/all/20240529133446.28446-2-
Jonathan.Cameron@xxxxxxxxxx/
We have observed the same issue. After booting the system with the
latest kernel, the sysfs path /sys/devices/system/cpu/cpu*/cpuidle
does not exist. Bisecting between v6.18-rc7 (good) and master (bad)
led us to the following commit:
43ff36c4a5a574ee83b4b0d3f3d74f09a3a8c2d3 Revert "ACPI: processor:
idle: Optimize ACPI idle driver registration"
Hello Amandeep,
I guess that your kernel doesn't have the following patch [1] if you
also encountered this issue.
The __acpi_processor_start() of all CPUs are called when run
driver_register(&acpi_processor_driver).
But acpi_processor_register_idle_driver() is called after
driver_register(&acpi_processor_driver).
As a result, the acpi_processor_power_init() would not register cpuidle
device and create these directory.
I tested it ok on my platform under the following modification.
Can you test it again using following modification based on kernel
without revert any ACPI idle patch?
I am looking forward to your reply. Thanks.
-->
diff --git a/drivers/acpi/processor_driver.c
b/drivers/acpi/processor_driver.c
index 4b906b56186a..b56a2a228693 100644
--- a/drivers/acpi/processor_driver.c
+++ b/drivers/acpi/processor_driver.c
@@ -268,12 +268,12 @@ static int __init acpi_processor_driver_init(void)
acpi_processor_ignore_ppc_init();
}
+ acpi_processor_register_idle_driver();
+
result = driver_register(&acpi_processor_driver);
if (result < 0)
return result;
- acpi_processor_register_idle_driver();
-
result = cpuhp_setup_state_nocalls(CPUHP_AP_ONLINE_DYN,
"acpi/cpu-drv:online",
acpi_soft_cpu_online, NULL);
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
index 66d8df5a37a6..a34983abb0b9 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -1404,6 +1404,7 @@ void acpi_processor_register_idle_driver(void)
if (!pr)
continue;
+ acpi_processor_cstate_first_run_checks();
ret = acpi_processor_get_power_info(pr);
if (!ret) {
pr->flags.power_setup_done = 1;
[1]
https://lore.kernel.org/all/20240529133446.28446-2-Jonathan.Cameron@xxxxxxxxxx/