Skip to content

Commit d4e5268

Browse files
author
Peter Zijlstra
committed
x86,objtool: Mark cpu_startup_entry() __noreturn
GCC-8 isn't clever enough to figure out that cpu_start_entry() is a noreturn while objtool is. This results in code after the call in start_secondary(). Give GCC a hand so that they all agree on things. vmlinux.o: warning: objtool: start_secondary()+0x10e: unreachable Reported-by: Rick Edgecombe <rick.p.edgecombe@intel.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Josh Poimboeuf <jpoimboe@redhat.com> Link: https://lore.kernel.org/r/20220408094718.383658532@infradead.org
1 parent 2730d3c commit d4e5268

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

include/linux/cpu.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ static inline int suspend_disable_secondary_cpus(void) { return 0; }
167167
static inline void suspend_enable_secondary_cpus(void) { }
168168
#endif /* !CONFIG_PM_SLEEP_SMP */
169169

170-
void cpu_startup_entry(enum cpuhp_state state);
170+
void __noreturn cpu_startup_entry(enum cpuhp_state state);
171171

172172
void cpu_idle_poll_ctrl(bool enable);
173173

tools/objtool/check.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ static bool __dead_end_function(struct objtool_file *file, struct symbol *func,
184184
"do_group_exit",
185185
"stop_this_cpu",
186186
"__invalid_creds",
187+
"cpu_startup_entry",
187188
};
188189

189190
if (!func)

0 commit comments

Comments
 (0)