public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* x86/smpboot: Question regarding native_play_dead() __noreturn warning
@ 2025-10-27 12:23 Thorsten Blum
  2025-10-27 12:50 ` Peter Zijlstra
  0 siblings, 1 reply; 4+ messages in thread
From: Thorsten Blum @ 2025-10-27 12:23 UTC (permalink / raw)
  To: Waiman Long, Thomas Gleixner, Ingo Molnar, Borislav Petkov,
	Dave Hansen, H. Peter Anvin
  Cc: linux-kernel, x86

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-10-27 16:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-27 12:23 x86/smpboot: Question regarding native_play_dead() __noreturn warning Thorsten Blum
2025-10-27 12:50 ` Peter Zijlstra
2025-10-27 15:48   ` Waiman Long
2025-10-27 16:23     ` Thorsten Blum

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox