aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/smp.c
diff options
context:
space:
mode:
authorMichael Ellerman <mpe@ellerman.id.au>2020-08-19 11:56:32 +1000
committerMichael Ellerman <mpe@ellerman.id.au>2020-09-18 19:59:43 +1000
commit1ea21ba231f248034e8c794aa675869ca2b97d42 (patch)
treee5a7f46657901c06600521f505158cf1b85b3b50 /arch/powerpc/kernel/smp.c
parentd10ebe79dfae7dc59b6cf77ffa615f0b8dae21bf (diff)
downloadlinux-1ea21ba231f248034e8c794aa675869ca2b97d42.tar.gz
powerpc: Move arch_cpu_idle_dead() into smp.c
arch_cpu_idle_dead() is in idle.c, which makes sense, but it's inside a CONFIG_HOTPLUG_CPU block. It would be more at home in smp.c, inside the existing CONFIG_HOTPLUG_CPU block. Note that CONFIG_HOTPLUG_CPU depends on CONFIG_SMP so even though smp.c is not built for SMP=n builds, that's fine. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20200819015634.1974478-1-mpe@ellerman.id.au
Diffstat (limited to 'arch/powerpc/kernel/smp.c')
-rw-r--r--arch/powerpc/kernel/smp.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c
index 3d96752d65701c..24b0476c1d4f08 100644
--- a/arch/powerpc/kernel/smp.c
+++ b/arch/powerpc/kernel/smp.c
@@ -1489,6 +1489,12 @@ void __cpu_die(unsigned int cpu)
smp_ops->cpu_die(cpu);
}
+void arch_cpu_idle_dead(void)
+{
+ sched_preempt_enable_no_resched();
+ cpu_die();
+}
+
void cpu_die(void)
{
/*