public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Thorsten Blum <thorsten.blum@linux.dev>
To: Waiman Long <longman@redhat.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	"H. Peter Anvin" <hpa@zytor.com>
Cc: linux-kernel@vger.kernel.org, x86@kernel.org
Subject: x86/smpboot: Question regarding native_play_dead() __noreturn warning
Date: Mon, 27 Oct 2025 13:23:02 +0100	[thread overview]
Message-ID: <47A8B84B-2685-4DA2-B39B-E55812374426@linux.dev> (raw)

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


             reply	other threads:[~2025-10-27 12:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-27 12:23 Thorsten Blum [this message]
2025-10-27 12:50 ` x86/smpboot: Question regarding native_play_dead() __noreturn warning Peter Zijlstra
2025-10-27 15:48   ` Waiman Long
2025-10-27 16:23     ` Thorsten Blum

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47A8B84B-2685-4DA2-B39B-E55812374426@linux.dev \
    --to=thorsten.blum@linux.dev \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=longman@redhat.com \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox