diff options
author | Josh Poimboeuf <jpoimboe@kernel.org> | 2023-02-13 23:05:58 -0800 |
---|---|---|
committer | Josh Poimboeuf <jpoimboe@kernel.org> | 2023-03-08 08:44:28 -0800 |
commit | 071c44e4278156f18a6a56958617223b6bffa6ab (patch) | |
tree | e928c7fe2eb63f56a17edc6e896804cafc73d542 /arch/ia64/kernel | |
parent | dfb0f170cadb03da4f408ae53cc2908120e1f90e (diff) | |
download | linux-071c44e4278156f18a6a56958617223b6bffa6ab.tar.gz linux-071c44e4278156f18a6a56958617223b6bffa6ab.tar.bz2 linux-071c44e4278156f18a6a56958617223b6bffa6ab.zip |
sched/idle: Mark arch_cpu_idle_dead() __noreturn
Before commit 076cbf5d2163 ("x86/xen: don't let xen_pv_play_dead()
return"), in Xen, when a previously offlined CPU was brought back
online, it unexpectedly resumed execution where it left off in the
middle of the idle loop.
There were some hacks to make that work, but the behavior was surprising
as do_idle() doesn't expect an offlined CPU to return from the dead (in
arch_cpu_idle_dead()).
Now that Xen has been fixed, and the arch-specific implementations of
arch_cpu_idle_dead() also don't return, give it a __noreturn attribute.
This will cause the compiler to complain if an arch-specific
implementation might return. It also improves code generation for both
caller and callee.
Also fixes the following warning:
vmlinux.o: warning: objtool: do_idle+0x25f: unreachable instruction
Reported-by: Paul E. McKenney <paulmck@kernel.org>
Tested-by: Paul E. McKenney <paulmck@kernel.org>
Link: https://lore.kernel.org/r/60d527353da8c99d4cf13b6473131d46719ed16d.1676358308.git.jpoimboe@kernel.org
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
Diffstat (limited to 'arch/ia64/kernel')
-rw-r--r-- | arch/ia64/kernel/process.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/ia64/kernel/process.c b/arch/ia64/kernel/process.c index 78f5794b2dde..9a5cd9fad3a9 100644 --- a/arch/ia64/kernel/process.c +++ b/arch/ia64/kernel/process.c @@ -225,7 +225,7 @@ static inline void __noreturn play_dead(void) } #endif /* CONFIG_HOTPLUG_CPU */ -void arch_cpu_idle_dead(void) +void __noreturn arch_cpu_idle_dead(void) { play_dead(); } |