init: remove obsolete arch_call_rest_init() wrapper
authorGeert Uytterhoeven <geert+renesas@glider.be>
Wed, 24 Jan 2024 14:27:35 +0000 (15:27 +0100)
committerAndrew Morton <akpm@linux-foundation.org>
Thu, 22 Feb 2024 23:38:55 +0000 (15:38 -0800)
Since commit 3570ee046c46b5dc ("s390/smp: keep the original lowcore for
CPU 0"), there is no longer any architecture that needs to override
arch_call_rest_init().

Remove the weak wrapper around rest_init(), call rest_init() directly, and
make rest_init() static.

Link: https://lkml.kernel.org/r/aa10868bfb176eef4abb8bb4a710b85330792694.1706106183.git.geert@linux-m68k.org
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Ilya Leoshkevich <iii@linux.ibm.com>
Cc: Josh Poimboeuf <jpoimboe@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/start_kernel.h
init/main.c
tools/objtool/noreturns.h

index a9806a44a605c7d7f8701b8cd4408f24deee76f1..09f994ac87df44f13aa59dca2e34b29bb3766e5e 100644 (file)
@@ -9,7 +9,5 @@
    up something else. */
 
 extern asmlinkage void __init __noreturn start_kernel(void);
-extern void __init __noreturn arch_call_rest_init(void);
-extern void __ref __noreturn rest_init(void);
 
 #endif /* _LINUX_START_KERNEL_H */
index e24b0780fdff7a807bd027ab26e61fc303c624ef..521f40770e67dd27ea6d8c939beba3d12dc3e63e 100644 (file)
@@ -681,7 +681,7 @@ static void __init setup_command_line(char *command_line)
 
 static __initdata DECLARE_COMPLETION(kthreadd_done);
 
-noinline void __ref __noreturn rest_init(void)
+static noinline void __ref __noreturn rest_init(void)
 {
        struct task_struct *tsk;
        int pid;
@@ -822,11 +822,6 @@ static int __init early_randomize_kstack_offset(char *buf)
 early_param("randomize_kstack_offset", early_randomize_kstack_offset);
 #endif
 
-void __init __weak __noreturn arch_call_rest_init(void)
-{
-       rest_init();
-}
-
 static void __init print_unknown_bootoptions(void)
 {
        char *unknown_options;
@@ -1069,7 +1064,7 @@ void start_kernel(void)
        kcsan_init();
 
        /* Do the rest non-__init'ed, we're now alive */
-       arch_call_rest_init();
+       rest_init();
 
        /*
         * Avoid stack canaries in callers of boot_init_stack_canary for gcc-10
index 1685d7ea6a9f70021d8ea3fcb10ad5eb316176d8..7cda577da897cac5fd56f3881d7f21cc8e3cd0f9 100644 (file)
@@ -12,7 +12,6 @@ NORETURN(__reiserfs_panic)
 NORETURN(__stack_chk_fail)
 NORETURN(__tdx_hypercall_failed)
 NORETURN(__ubsan_handle_builtin_unreachable)
-NORETURN(arch_call_rest_init)
 NORETURN(arch_cpu_idle_dead)
 NORETURN(bch2_trans_in_restart_error)
 NORETURN(bch2_trans_restart_error)