]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
init: Mark start_kernel() __noreturn
authorJosh Poimboeuf <jpoimboe@kernel.org>
Wed, 12 Apr 2023 23:49:32 +0000 (16:49 -0700)
committerPeter Zijlstra <peterz@infradead.org>
Fri, 14 Apr 2023 15:31:23 +0000 (17:31 +0200)
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
include/linux/start_kernel.h
init/main.c
tools/objtool/check.c

index 864921e54c928fd66dc338e0c90979b9ce6aafa6..a9806a44a605c7d7f8701b8cd4408f24deee76f1 100644 (file)
@@ -8,7 +8,7 @@
 /* Define the prototype for start_kernel here, rather than cluttering
    up something else. */
 
-extern asmlinkage void __init start_kernel(void);
+extern asmlinkage void __init __noreturn start_kernel(void);
 extern void __init __noreturn arch_call_rest_init(void);
 extern void __ref __noreturn rest_init(void);
 
index 161ed956d7383e8dac01bffc4838a1f280ccf8b4..65aab4e9bb49cfa8c55ddd0e475137ddc8b74f39 100644 (file)
@@ -937,7 +937,7 @@ static void __init print_unknown_bootoptions(void)
        memblock_free(unknown_options, len);
 }
 
-asmlinkage __visible void __init __no_sanitize_address start_kernel(void)
+asmlinkage __visible void __init __no_sanitize_address __noreturn start_kernel(void)
 {
        char *command_line;
        char *after_dashes;
index 3d7227f0ea2a3781ed577d78d92ae226062b6597..9aaad9dc6c208df75227caca2ff03f88dea6ba1e 100644 (file)
@@ -222,6 +222,7 @@ static bool __dead_end_function(struct objtool_file *file, struct symbol *func,
                "rewind_stack_and_make_dead",
                "sev_es_terminate",
                "snp_abort",
+               "start_kernel",
                "stop_this_cpu",
                "usercopy_abort",
                "xen_cpu_bringup_again",