x86: Mark stop_this_cpu() __noreturn
authorPeter Zijlstra <peterz@infradead.org>
Tue, 8 Mar 2022 15:30:47 +0000 (16:30 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Mar 2023 08:39:12 +0000 (09:39 +0100)
[ Upstream commit f9cdf7ca57cada055f61ef6d0eb4db21c3f200db ]

vmlinux.o: warning: objtool: smp_stop_nmi_callback()+0x2b: unreachable instruction

0000 0000000000047cf0 <smp_stop_nmi_callback>:
...
0026    47d16:  e8 00 00 00 00          call   47d1b <smp_stop_nmi_callback+0x2b>       47d17: R_X86_64_PLT32   stop_this_cpu-0x4
002b    47d1b:  b8 01 00 00 00          mov    $0x1,%eax

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Josh Poimboeuf <jpoimboe@redhat.com>
Link: https://lore.kernel.org/r/20220308154319.290905453@infradead.org
Stable-dep-of: c0dd9245aa9e ("x86/microcode: Check CPU capabilities after late microcode update correctly")
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/x86/include/asm/processor.h
arch/x86/kernel/process.c
tools/objtool/check.c

index 577f342dbfb27fbd16c1cb38482c969a61887958..5c7904c97a1a790dce1449479b89bdbde919e206 100644 (file)
@@ -834,7 +834,7 @@ bool xen_set_default_idle(void);
 #define xen_set_default_idle 0
 #endif
 
-void stop_this_cpu(void *dummy);
+void __noreturn stop_this_cpu(void *dummy);
 void microcode_check(void);
 
 enum l1tf_mitigations {
index bc9b4b93cf9bcb895d922efc3ee6dcbe77e8c8ff..e6b28c689e9a9055295568e0a3b3efda11b9504a 100644 (file)
@@ -731,7 +731,7 @@ bool xen_set_default_idle(void)
 }
 #endif
 
-void stop_this_cpu(void *dummy)
+void __noreturn stop_this_cpu(void *dummy)
 {
        local_irq_disable();
        /*
index 758c0ba8de350056de832e19b450b11b7769ae9d..3ef767284b3f04b862d9f2d6cfb070e378cd8ce3 100644 (file)
@@ -181,6 +181,7 @@ static bool __dead_end_function(struct objtool_file *file, struct symbol *func,
                "kunit_try_catch_throw",
                "xen_start_kernel",
                "cpu_bringup_and_idle",
+               "stop_this_cpu",
        };
 
        if (!func)