Skip to content

Commit 8ea554c

Browse files
committed
x86/smp: Fix mwait_play_dead() and acpi_processor_ffh_play_dead() noreturn behavior [partial 2]
JIRA: https://issues.redhat.com/browse/RHEL-85302 Conflicts: tools/objtool/noreturns.h - RHEL doesn't have noreturns.h, so update global_no_returns[] in tools/objtool/check.c for acpi_processor_ffh_play_dead. This completes the partial backport started by cs-9's d0c965e. commit 4e32645 Author: Josh Poimboeuf <jpoimboe@kernel.org> Date: Sun Mar 2 16:48:51 2025 -0800 x86/smp: Fix mwait_play_dead() and acpi_processor_ffh_play_dead() noreturn behavior Fix some related issues (done in a single patch to avoid introducing intermediate bisect warnings): 1) The SMP version of mwait_play_dead() doesn't return, but its !SMP counterpart does. Make its calling behavior consistent by resolving the !SMP version to a BUG(). It should never be called anyway, this just enforces that at runtime and enables its callers to be marked as __noreturn. 2) While the SMP definition of mwait_play_dead() is annotated as __noreturn, the declaration isn't. Nor is it listed in tools/objtool/noreturns.h. Fix that. 3) Similar to #1, the SMP version of acpi_processor_ffh_play_dead() doesn't return but its !SMP counterpart does. Make the !SMP version a BUG(). It should never be called. 4) acpi_processor_ffh_play_dead() doesn't return, but is lacking any __noreturn annotations. Fix that. This fixes the following objtool warnings: vmlinux.o: warning: objtool: acpi_processor_ffh_play_dead+0x67: mwait_play_dead() is missing a __noreturn annotation vmlinux.o: warning: objtool: acpi_idle_play_dead+0x3c: acpi_processor_ffh_play_dead() is missing a __noreturn annotation Fixes: a7dd183 ("x86/smp: Allow calling mwait_play_dead with an arbitrary hint") Fixes: 541ddf3 ("ACPI/processor_idle: Add FFH state handling") Reported-by: Paul E. McKenney <paulmck@kernel.org> Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Tested-by: Paul E. McKenney <paulmck@kernel.org> Link: https://lore.kernel.org/r/e885c6fa9e96a61471b33e48c2162d28b15b14c5.1740962711.git.jpoimboe@kernel.org Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com>
1 parent 818e414 commit 8ea554c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

tools/objtool/check.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@ static bool __dead_end_function(struct objtool_file *file, struct symbol *func,
188188
"__stack_chk_fail",
189189
"__tdx_hypercall_failed",
190190
"__ubsan_handle_builtin_unreachable",
191+
"acpi_processor_ffh_play_dead",
191192
"arch_call_rest_init",
192193
"cpu_bringup_and_idle",
193194
"cpu_startup_entry",

0 commit comments

Comments
 (0)