History

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

Peter Zijlstra committed 4 years ago

Commit d4e52681 parent 2730d3c2 files · +2 −1Browse files

Unified · Split

2 files
  1. include/linux/cpu.h +1 −1
  2. tools/objtool/check.c +1 −0
include/linux/cpu.h+1−1
@@ -167,7 +167,7 @@ static inline int suspend_disable_secondary_cpus(void) { return 0; } · 166 unmodified lines
167static inline void suspend_enable_secondary_cpus(void) { }167static inline void suspend_enable_secondary_cpus(void) { }
168#endif /* !CONFIG_PM_SLEEP_SMP */168#endif /* !CONFIG_PM_SLEEP_SMP */
169 169
170void cpu_startup_entry(enum cpuhp_state state);170void __noreturn cpu_startup_entry(enum cpuhp_state state);
171 171
172void cpu_idle_poll_ctrl(bool enable);172void cpu_idle_poll_ctrl(bool enable);
173 173
tools/objtool/check.c+1−0
@@ -184,6 +184,7 @@ static bool __dead_end_function(struct objtool_file *file, struct symbol *func, · 183 unmodified lines
184 "do_group_exit",184 "do_group_exit",
185 "stop_this_cpu",185 "stop_this_cpu",
186 "__invalid_creds",186 "__invalid_creds",
187 "cpu_startup_entry",
187 };188 };
188 189
189 if (!func)190 if (!func)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t