]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
x86/cpu: Mark {hlt,resume}_play_dead() __noreturn
authorJosh Poimboeuf <jpoimboe@kernel.org>
Wed, 12 Apr 2023 23:49:39 +0000 (16:49 -0700)
committerPeter Zijlstra <peterz@infradead.org>
Fri, 14 Apr 2023 15:31:27 +0000 (17:31 +0200)
Fixes the following warning:

  vmlinux.o: warning: objtool: resume_play_dead+0x21: unreachable instruction

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/ce1407c4bf88b1334fe40413126343792a77ca50.1681342859.git.jpoimboe@kernel.org
arch/x86/include/asm/smp.h
arch/x86/kernel/smpboot.c
arch/x86/power/cpu.c
tools/objtool/check.c

index e6d1d2810e38433f19ab3833d86951740d6f2618..47ce4c79a3b0f80c99469b13d8ccc07fed168d22 100644 (file)
@@ -125,7 +125,7 @@ int native_cpu_up(unsigned int cpunum, struct task_struct *tidle);
 int native_cpu_disable(void);
 int common_cpu_die(unsigned int cpu);
 void native_cpu_die(unsigned int cpu);
-void hlt_play_dead(void);
+void __noreturn hlt_play_dead(void);
 void native_play_dead(void);
 void play_dead_common(void);
 void wbinvd_on_cpu(int cpu);
index 9013bb28255a13da21afdf291d4f5f04c0a5f923..a6da3f94b7b62fb64a725385c209f5a970816702 100644 (file)
@@ -1816,7 +1816,7 @@ static inline void mwait_play_dead(void)
        }
 }
 
-void hlt_play_dead(void)
+void __noreturn hlt_play_dead(void)
 {
        if (__this_cpu_read(cpu_info.x86) >= 4)
                wbinvd();
index 236447ee9beb43eb2f6e61edc3bce90a0441c7d7..7a4d5e91141528e9b87fc3a3719aa2a82f537615 100644 (file)
@@ -288,7 +288,7 @@ EXPORT_SYMBOL(restore_processor_state);
 #endif
 
 #if defined(CONFIG_HIBERNATION) && defined(CONFIG_HOTPLUG_CPU)
-static void resume_play_dead(void)
+static void __noreturn resume_play_dead(void)
 {
        play_dead_common();
        tboot_shutdown(TB_SHUTDOWN_WFS);
index ceb98489d71874ac4d0fd9af8c2bb51a8602b915..724a63bdc412d6705769eeef2b288e6a9092c648 100644 (file)
@@ -212,6 +212,7 @@ static bool __dead_end_function(struct objtool_file *file, struct symbol *func,
                "do_task_dead",
                "ex_handler_msr_mce",
                "fortify_panic",
+               "hlt_play_dead",
                "kthread_complete_and_exit",
                "kthread_exit",
                "kunit_try_catch_throw",
@@ -222,6 +223,7 @@ static bool __dead_end_function(struct objtool_file *file, struct symbol *func,
                "panic",
                "panic_smp_self_stop",
                "rest_init",
+               "resume_play_dead",
                "rewind_stack_and_make_dead",
                "sev_es_terminate",
                "snp_abort",