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

Message ID 167848168775.5837.8625028915626505990.tip-bot2@tip-bot2
State New
Headers
Series [tip:,objtool/core] sched/idle: Make sure weak version of arch_cpu_idle_dead() doesn't return |

Commit Message

tip-bot2 for Thomas Gleixner March 10, 2023, 8:54 p.m. UTC
  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@kernel.org>
AuthorDate:    Mon, 13 Feb 2023 23:05:55 -08:00
Committer:     Josh Poimboeuf <jpoimboe@kernel.org>
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@kernel.org
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
---
 kernel/sched/idle.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

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;