[PATCH] ACPI: processor: idle: Add __cpuidle to acpi_idle_lpi_enter
From: lirongqing
Date: Mon Jun 15 2026 - 02:54:33 EST
From: Li RongQing <lirongqing@xxxxxxxxx>
When function tracing is enabled, entering an LPI idle state
triggers:
RCU not on for: acpi_idle_lpi_enter+0x4/0xd8
WARNING: CPU: 8 PID: 0 at include/linux/trace_recursion.h:162
function_trace_call+0x1e8/0x228
acpi_idle_lpi_enter is called from the cpuidle path where RCU
may already be disabled. ftrace's function_trace_call checks
that RCU is watching before recording, and warns otherwise.
Mark the function with __cpuidle, which includes notrace, to
suppress ftrace instrumentation in this path. Other cpuidle
enter functions already carry this annotation.
Fixes: a36a7fecfe60 ("ACPI / processor_idle: Add support for Low Power Idle(LPI) states")
Signed-off-by: Li RongQing <lirongqing@xxxxxxxxx>
---
drivers/acpi/processor_idle.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
index ee5facc..0ca404b 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -1156,7 +1156,7 @@ int __weak acpi_processor_ffh_lpi_enter(struct acpi_lpi_state *lpi)
*
* Return: 0 for success or negative value for error
*/
-static int acpi_idle_lpi_enter(struct cpuidle_device *dev,
+static int __cpuidle acpi_idle_lpi_enter(struct cpuidle_device *dev,
struct cpuidle_driver *drv, int index)
{
struct acpi_processor *pr;
--
2.9.4