Skip to content

Commit 25a6917

Browse files
jpoimboePeter Zijlstra
authored andcommitted
init: Mark start_kernel() __noreturn
Now that arch_call_rest_init() is __noreturn, mark its caller start_kernel() __noreturn. Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lore.kernel.org/r/7069acf026a195f26a88061227fba5a3b0337b9a.1681342859.git.jpoimboe@kernel.org
1 parent 9ea7e6b commit 25a6917

3 files changed

Lines changed: 3 additions & 2 deletions

File tree

include/linux/start_kernel.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
/* Define the prototype for start_kernel here, rather than cluttering
99
up something else. */
1010

11-
extern asmlinkage void __init start_kernel(void);
11+
extern asmlinkage void __init __noreturn start_kernel(void);
1212
extern void __init __noreturn arch_call_rest_init(void);
1313
extern void __ref __noreturn rest_init(void);
1414

init/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -937,7 +937,7 @@ static void __init print_unknown_bootoptions(void)
937937
memblock_free(unknown_options, len);
938938
}
939939

940-
asmlinkage __visible void __init __no_sanitize_address start_kernel(void)
940+
asmlinkage __visible void __init __no_sanitize_address __noreturn start_kernel(void)
941941
{
942942
char *command_line;
943943
char *after_dashes;

tools/objtool/check.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,7 @@ static bool __dead_end_function(struct objtool_file *file, struct symbol *func,
222222
"rewind_stack_and_make_dead",
223223
"sev_es_terminate",
224224
"snp_abort",
225+
"start_kernel",
225226
"stop_this_cpu",
226227
"usercopy_abort",
227228
"xen_cpu_bringup_again",

0 commit comments

Comments
 (0)