Centos-kernel-stream-9/tools/objtool
David Arcari d0c965e70f x86/smp: Fix mwait_play_dead() and acpi_processor_ffh_play_dead() noreturn behavior [partial]
JIRA: https://issues.redhat.com/browse/RHEL-85522
Conflicts: RHEL doesn't have noreturns.h, so update global_no_returns[]
	   in tools/objtool/check.c

commit 4e32645cd8f97a308300623f81c902747df6b97b
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: a7dd183f0b38 ("x86/smp: Allow calling mwait_play_dead with an arbitrary hint")
    Fixes: 541ddf31e300 ("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: David Arcari <darcari@redhat.com>
2025-04-01 07:27:08 -04:00
..
Documentation objtool: Update documentation 2022-10-27 15:26:52 -04:00
arch/x86 x86/bugs: Rename CONFIG_RETPOLINE => CONFIG_MITIGATION_RETPOLINE 2024-07-26 14:33:35 -04:00
include/objtool objtool: Allow stack operations in UNWIND_HINT_UNDEFINED regions 2024-09-18 15:15:03 +02:00
.gitignore
Build objtool: Ditch subcommands 2022-10-27 15:26:51 -04:00
Makefile objtool: Remove libsubcmd.a when make clean 2022-10-27 15:26:52 -04:00
builtin-check.c objtool: Add --mnop as an option to --mcount 2024-03-20 09:43:05 -04:00
check.c x86/smp: Fix mwait_play_dead() and acpi_processor_ffh_play_dead() noreturn behavior [partial] 2025-04-01 07:27:08 -04:00
elf.c objtool: Fix find_{symbol,func}_containing() 2023-06-30 20:17:18 -04:00
objtool.c objtool: Add .call_sites section 2023-06-30 20:17:17 -04:00
orc_dump.c x86,objtool: Split UNWIND_HINT_EMPTY in two 2024-09-18 15:14:40 +02:00
orc_gen.c x86,objtool: Split UNWIND_HINT_EMPTY in two 2024-09-18 15:14:40 +02:00
special.c
sync-check.sh objtool: Add objtool_types.h 2023-10-22 20:19:51 -04:00
weak.c objtool: Ditch subcommands 2022-10-27 15:26:51 -04:00