Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

+2 -1
+1 -1
include/linux/cpu.h
··· 167 167 static inline void suspend_enable_secondary_cpus(void) { } 168 168 #endif /* !CONFIG_PM_SLEEP_SMP */ 169 169 170 - void cpu_startup_entry(enum cpuhp_state state); 170 + void __noreturn cpu_startup_entry(enum cpuhp_state state); 171 171 172 172 void cpu_idle_poll_ctrl(bool enable); 173 173
+1
tools/objtool/check.c
··· 184 184 "do_group_exit", 185 185 "stop_this_cpu", 186 186 "__invalid_creds", 187 + "cpu_startup_entry", 187 188 }; 188 189 189 190 if (!func)