x86/smpboot: Question regarding native_play_dead() __noreturn warning

From: Thorsten Blum

Date: Mon Oct 27 2025 - 08:24:13 EST


Hi,

I just came across this comment in arch/x86/kernel/smpboot.c:

/*
* native_play_dead() is essentially a __noreturn function, but it can't
* be marked as such as the compiler may complain about it.
*/
void native_play_dead(void) {
...
}

and when I mark native_play_dead() as __noreturn, neither gcc nor clang
complain about it.

The commit message 2743fe89d4d4 ("x86/idle: Disable IBRS when CPU is
offline to improve single-threaded performance") says:

"Add a comment to say that native_play_dead() is a __noreturn function,
but it can't be marked as such to avoid confusion about the missing
MSR restoration code."

Unfortunately, that doesn't really help me either. Can someone explain
what the issue was and if the comment is still valid? Otherwise, I'd
like to submit a patch adding __noreturn and removing the comment.

Thanks,
Thorsten