]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
x86/smpboot: Mark native_play_dead() as __noreturn
authorThorsten Blum <thorsten.blum@linux.dev>
Mon, 27 Oct 2025 15:51:02 +0000 (16:51 +0100)
committerJosh Poimboeuf <jpoimboe@kernel.org>
Thu, 30 Oct 2025 15:29:41 +0000 (08:29 -0700)
commit0ccf30fc64acca8e43a54a4f54fb3a4f155d4692
tree47ea7745d0af8d1f4a100e5cf9012b1a68441a09
parentf6af8690d17d8621a6c8cdb24746c904adfc9465
x86/smpboot: Mark native_play_dead() as __noreturn

native_play_dead() ends by calling the non-returning function
hlt_play_dead() and therefore also never returns.

The !CONFIG_HOTPLUG_CPU stub version of native_play_dead()
unconditionally calls BUG() and does not return either.

Add the __noreturn attribute to both function definitions and their
declaration to document this behavior and to potentially improve
compiler optimizations.

Remove the obsolete comment, and add native_play_dead() to the objtool's
list of __noreturn functions.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Link: https://patch.msgid.link/20251027155107.183136-1-thorsten.blum@linux.dev
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
arch/x86/include/asm/smp.h
arch/x86/kernel/smpboot.c
tools/objtool/noreturns.h