Skip to content

Commit

Permalink
x86: Mark stop_this_cpu() __noreturn
Browse files Browse the repository at this point in the history
[ Upstream commit f9cdf7c ]

vmlinux.o: warning: objtool: smp_stop_nmi_callback()+0x2b: unreachable instruction

0000 0000000000047cf0 <smp_stop_nmi_callback>:
...
0026    47d16:  e8 00 00 00 00          call   47d1b <smp_stop_nmi_callback+0x2b>       47d17: R_X86_64_PLT32   stop_this_cpu-0x4
002b    47d1b:  b8 01 00 00 00          mov    $0x1,%eax

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Josh Poimboeuf <jpoimboe@redhat.com>
Link: https://lore.kernel.org/r/20220308154319.290905453@infradead.org
Stable-dep-of: c0dd924 ("x86/microcode: Check CPU capabilities after late microcode update correctly")
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Peter Zijlstra authored and Greg Kroah-Hartman committed Mar 10, 2023
1 parent e4de2b9 commit 54aa76a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion arch/x86/include/asm/processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -834,7 +834,7 @@ bool xen_set_default_idle(void);
#define xen_set_default_idle 0
#endif

void stop_this_cpu(void *dummy);
void __noreturn stop_this_cpu(void *dummy);
void microcode_check(void);

enum l1tf_mitigations {
Expand Down
2 changes: 1 addition & 1 deletion arch/x86/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -731,7 +731,7 @@ bool xen_set_default_idle(void)
}
#endif

void stop_this_cpu(void *dummy)
void __noreturn stop_this_cpu(void *dummy)
{
local_irq_disable();
/*
Expand Down
1 change: 1 addition & 0 deletions tools/objtool/check.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ static bool __dead_end_function(struct objtool_file *file, struct symbol *func,
"kunit_try_catch_throw",
"xen_start_kernel",
"cpu_bringup_and_idle",
"stop_this_cpu",
};

if (!func)
Expand Down

0 comments on commit 54aa76a

Please sign in to comment.