[tip: objtool/core] sched/idle: Make sure weak version of arch_cpu_idle_dead() doesn't return

From: tip-bot2 for Josh Poimboeuf
Date: Fri Mar 10 2023 - 15:55:21 EST


The following commit has been merged into the objtool/core branch of tip:

Commit-ID: dfb0f170cadb03da4f408ae53cc2908120e1f90e
Gitweb: https://git.kernel.org/tip/dfb0f170cadb03da4f408ae53cc2908120e1f90e
Author: Josh Poimboeuf <jpoimboe@xxxxxxxxxx>
AuthorDate: Mon, 13 Feb 2023 23:05:55 -08:00
Committer: Josh Poimboeuf <jpoimboe@xxxxxxxxxx>
CommitterDate: Wed, 08 Mar 2023 08:44:27 -08:00

sched/idle: Make sure weak version of arch_cpu_idle_dead() doesn't return

arch_cpu_idle_dead() should never return. Make it so.

Link: https://lore.kernel.org/r/cf5ad95eef50f7704bb30e7770c59bfe23372af7.1676358308.git.jpoimboe@xxxxxxxxxx
Signed-off-by: Josh Poimboeuf <jpoimboe@xxxxxxxxxx>
---
kernel/sched/idle.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sched/idle.c b/kernel/sched/idle.c
index e9ef66b..56e152f 100644
--- a/kernel/sched/idle.c
+++ b/kernel/sched/idle.c
@@ -75,7 +75,7 @@ static noinline int __cpuidle cpu_idle_poll(void)
void __weak arch_cpu_idle_prepare(void) { }
void __weak arch_cpu_idle_enter(void) { }
void __weak arch_cpu_idle_exit(void) { }
-void __weak arch_cpu_idle_dead(void) { }
+void __weak arch_cpu_idle_dead(void) { while (1); }
void __weak arch_cpu_idle(void)
{
cpu_idle_force_poll = 1;