* [RFC PATCH 07/20] perf: Always inline the empty perf_lopwr_cb() stub
[not found] <20261028120034.871983-1-sashal@kernel.org>
@ 2026-10-28 11:59 ` Sasha Levin
2026-10-29 12:01 ` sashiko-bot
0 siblings, 1 reply; 2+ messages in thread
From: Sasha Levin @ 2026-10-28 11:59 UTC (permalink / raw)
To: linux-kernel
Cc: Adrian Hunter, Alexander Shishkin, Arnaldo Carvalho de Melo,
Chuck Wolber, Ian Rogers, Ingo Molnar, James Clark, Jiri Olsa,
linux-perf-users, Marco Elver, Mark Rutland, Masami Hiramatsu,
Namhyung Kim, Peter Zijlstra, Thomas Gleixner
perf_lopwr_cb() is called from the noinstr acpi_idle_do_entry(). The
x86 implementation is __always_inline, but the empty fallback is a
plain static inline function, which the compiler won't inline into
noinstr code when building with code coverage instrumentation:
vmlinux.o: warning: objtool: acpi_idle_do_entry+0x4: call to perf_lopwr_cb() leaves .noinstr.text section
Make the stub __always_inline as well.
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
include/linux/perf_event.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h
index eb3f7bab498ca..dcda92526b78c 100644
--- a/include/linux/perf_event.h
+++ b/include/linux/perf_event.h
@@ -2137,7 +2137,7 @@ typedef int (perf_snapshot_branch_stack_t)(struct perf_branch_entry *entries,
DECLARE_STATIC_CALL(perf_snapshot_branch_stack, perf_snapshot_branch_stack_t);
#ifndef PERF_NEEDS_LOPWR_CB
-static inline void perf_lopwr_cb(bool mode)
+static __always_inline void perf_lopwr_cb(bool mode)
{
}
#endif
--
2.53.0
^ permalink raw reply related [flat|nested] 2+ messages in thread