From: Josh Poimboeuf <jpoimboe@kernel.org>
To: x86@kernel.org
Cc: linux-kernel@vger.kernel.org,
Peter Zijlstra <peterz@infradead.org>,
Miroslav Benes <mbenes@suse.cz>,
linux-btrfs@vger.kernel.org, Mark Rutland <mark.rutland@arm.com>,
linux-scsi@vger.kernel.org, linux-hyperv@vger.kernel.org,
Arnd Bergmann <arnd@arndb.de>,
"Guilherme G . Piccoli" <gpiccoli@igalia.com>,
Michael Kelley <mikelley@microsoft.com>
Subject: [PATCH 08/11] x86/cpu: Mark {hlt,resume}_play_dead() __noreturn
Date: Fri, 7 Apr 2023 17:10:01 -0700 [thread overview]
Message-ID: <f28f2dd16f7dcc3951988aa34b47fdf081ae2f36.1680912057.git.jpoimboe@kernel.org> (raw)
In-Reply-To: <cover.1680912057.git.jpoimboe@kernel.org>
Fixes the following warning:
vmlinux.o: warning: objtool: resume_play_dead+0x21: unreachable instruction
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
---
arch/x86/include/asm/smp.h | 2 +-
arch/x86/kernel/smpboot.c | 2 +-
arch/x86/power/cpu.c | 2 +-
tools/objtool/check.c | 2 ++
4 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/arch/x86/include/asm/smp.h b/arch/x86/include/asm/smp.h
index e6d1d2810e38..47ce4c79a3b0 100644
--- a/arch/x86/include/asm/smp.h
+++ b/arch/x86/include/asm/smp.h
@@ -125,7 +125,7 @@ int native_cpu_up(unsigned int cpunum, struct task_struct *tidle);
int native_cpu_disable(void);
int common_cpu_die(unsigned int cpu);
void native_cpu_die(unsigned int cpu);
-void hlt_play_dead(void);
+void __noreturn hlt_play_dead(void);
void native_play_dead(void);
void play_dead_common(void);
void wbinvd_on_cpu(int cpu);
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index 9013bb28255a..a6da3f94b7b6 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -1816,7 +1816,7 @@ static inline void mwait_play_dead(void)
}
}
-void hlt_play_dead(void)
+void __noreturn hlt_play_dead(void)
{
if (__this_cpu_read(cpu_info.x86) >= 4)
wbinvd();
diff --git a/arch/x86/power/cpu.c b/arch/x86/power/cpu.c
index 236447ee9beb..7a4d5e911415 100644
--- a/arch/x86/power/cpu.c
+++ b/arch/x86/power/cpu.c
@@ -288,7 +288,7 @@ EXPORT_SYMBOL(restore_processor_state);
#endif
#if defined(CONFIG_HIBERNATION) && defined(CONFIG_HOTPLUG_CPU)
-static void resume_play_dead(void)
+static void __noreturn resume_play_dead(void)
{
play_dead_common();
tboot_shutdown(TB_SHUTDOWN_WFS);
diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index c5621dd866e1..a926da218c01 100644
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -212,6 +212,7 @@ static bool __dead_end_function(struct objtool_file *file, struct symbol *func,
"do_task_dead",
"ex_handler_msr_mce",
"fortify_panic",
+ "hlt_play_dead",
"kthread_complete_and_exit",
"kthread_exit",
"kunit_try_catch_throw",
@@ -222,6 +223,7 @@ static bool __dead_end_function(struct objtool_file *file, struct symbol *func,
"panic",
"panic_smp_self_stop",
"rest_init",
+ "resume_play_dead",
"rewind_stack_and_make_dead",
"sev_es_terminate",
"snp_abort",
--
2.39.2
next prev parent reply other threads:[~2023-04-08 0:10 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-08 0:09 [PATCH 00/12] Sprinkle more __noreturn Josh Poimboeuf
2023-04-08 0:09 ` [PATCH 01/11] init: Mark [arch_call_]rest_init() __noreturn Josh Poimboeuf
2023-04-10 20:02 ` Nick Desaulniers
2023-04-08 0:09 ` [PATCH 02/11] init: Mark start_kernel() __noreturn Josh Poimboeuf
2023-04-12 20:29 ` Nick Desaulniers
2023-04-12 21:57 ` Josh Poimboeuf
2023-04-12 23:26 ` Josh Poimboeuf
2023-04-08 0:09 ` [PATCH 03/11] x86/head: Mark *_start_kernel() __noreturn Josh Poimboeuf
2023-04-08 0:09 ` [PATCH 04/11] btrfs: Mark btrfs_assertfail() __noreturn Josh Poimboeuf
2023-04-08 0:09 ` [PATCH 05/11] arm64/cpu: Mark cpu_park_loop() and friends __noreturn Josh Poimboeuf
2023-04-08 0:09 ` [PATCH 06/11] cpu: Mark panic_smp_self_stop() __noreturn Josh Poimboeuf
2023-04-08 0:10 ` [PATCH 07/11] cpu: Mark nmi_panic_self_stop() __noreturn Josh Poimboeuf
2023-04-08 0:10 ` Josh Poimboeuf [this message]
2023-04-08 0:10 ` [PATCH 09/11] objtool: Include weak functions in global_noreturns check Josh Poimboeuf
2023-04-08 0:10 ` [PATCH 10/11] scsi: message: fusion: Mark mpt_halt_firmware() __noreturn Josh Poimboeuf
2023-04-08 0:10 ` [PATCH 11/11] x86/hyperv: Mark hv_ghcb_terminate() as noreturn Josh Poimboeuf
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=f28f2dd16f7dcc3951988aa34b47fdf081ae2f36.1680912057.git.jpoimboe@kernel.org \
--to=jpoimboe@kernel.org \
--cc=arnd@arndb.de \
--cc=gpiccoli@igalia.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mbenes@suse.cz \
--cc=mikelley@microsoft.com \
--cc=peterz@infradead.org \
--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
all inboxes | Powered by JetHome®