Linux ACPI
 help / color / mirror / Atom feed
* [PATCH] ACPI: processor: idle: Add __cpuidle to acpi_idle_lpi_enter
@ 2026-06-15  6:54 lirongqing
  2026-06-15 11:40 ` kernel test robot
  2026-06-15 19:44 ` kernel test robot
  0 siblings, 2 replies; 3+ messages in thread
From: lirongqing @ 2026-06-15  6:54 UTC (permalink / raw)
  To: Rafael J . Wysocki, Len Brown, Sudeep Holla, linux-acpi,
	linux-kernel
  Cc: Li RongQing

From: Li RongQing <lirongqing@baidu.com>

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@baidu.com>
---
 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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-06-15 19:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-15  6:54 [PATCH] ACPI: processor: idle: Add __cpuidle to acpi_idle_lpi_enter lirongqing
2026-06-15 11:40 ` kernel test robot
2026-06-15 19:44 ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox