arm/cpu: Add unreachable() to arch_cpu_idle_dead()
authorJosh Poimboeuf <jpoimboe@kernel.org>
Thu, 16 Feb 2023 18:38:55 +0000 (10:38 -0800)
committerJosh Poimboeuf <jpoimboe@kernel.org>
Mon, 6 Mar 2023 23:34:04 +0000 (15:34 -0800)
arch_cpu_idle_dead() doesn't return.  Make that visible to the compiler
with an unreachable() code annotation.

Link: https://lkml.kernel.org/r/20230216183851.s5bnvniomq44rytu@treble
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
arch/arm/kernel/smp.c

index 0b8c25763adc3810fcfa99465a97718be6e7f7e7..441ea5cff3901999984a702d0e4e65fd9ee2297e 100644 (file)
@@ -382,6 +382,8 @@ void arch_cpu_idle_dead(void)
                : "r" (task_stack_page(current) + THREAD_SIZE - 8),
                  "r" (current)
                : "r0");
+
+       unreachable();
 }
 #endif /* CONFIG_HOTPLUG_CPU */