sched/hotplug: Remove unused idle_task_exit
Subsystems (17)
PATCH 1/1 sched/hotplug: Remove unused idle_task_exit
Commit 21641bd9a7a7 ("lazy tlb: fix hotplug exit race with MMU_LAZY_TLB_SHOOTDOWN") moved the handling previously performed by idle_task_exit() into the scheduler CPU hotplug path using sched_force_init_mm().
As a result, idle_task_exit() is now an empty stub and the remaining architecture call sites have no effect.
Remove the calls to idle_task_exit() and the now unused stub.
--- arch/arm/kernel/smp.c | 2 -- arch/arm64/kernel/smp.c | 2 -- arch/csky/kernel/smp.c | 2 -- arch/loongarch/kernel/smp.c | 2 -- arch/mips/cavium-octeon/smp.c | 1 - arch/mips/kernel/smp-bmips.c | 1 - arch/mips/kernel/smp-cps.c | 1 - arch/mips/loongson64/smp.c | 1 - arch/parisc/kernel/process.c | 2 -- arch/powerpc/platforms/85xx/smp.c | 2 -- arch/powerpc/platforms/powermac/smp.c | 2 -- arch/powerpc/platforms/powernv/smp.c | 1 - arch/powerpc/platforms/pseries/hotplug-cpu.c | 2 -- arch/powerpc/platforms/pseries/pmem.c | 1 - arch/riscv/kernel/cpu-hotplug.c | 2 -- arch/s390/kernel/smp.c | 1 - arch/sh/kernel/smp.c | 1 - arch/sparc/kernel/smp_64.c | 2 -- arch/x86/kernel/smpboot.c | 2 -- arch/xtensa/kernel/smp.c | 1 - include/linux/sched/hotplug.h | 2 -- 21 files changed, 33 deletions(-)
arch/arm/kernel/smp.c +0 -2
@@ -319,8 +319,6 @@ void __noreturn arch_cpu_idle_dead(void) {unsigned int cpu =smp_processor_id (); -idle_task_exit (); -local_irq_disable ();/*
arch/arm64/kernel/smp.c +0 -2
@@ -370,8 +370,6 @@ void __noreturn cpu_die(void)unsigned int cpu =smp_processor_id ();const struct cpu_operations *ops =get_cpu_ops (cpu); -idle_task_exit (); -local_daif_mask ();/* Tell cpuhp_bp_sync_dead() that this CPU is now safe to dispose of */
arch/csky/kernel/smp.c +0 -2
@@ -294,8 +294,6 @@ void arch_cpuhp_cleanup_dead_cpu(unsigned int cpu)void __noreturn arch_cpu_idle_dead (void ) { -idle_task_exit (); -cpuhp_ap_report_dead ();while (!secondary_stack)
arch/loongarch/kernel/smp.c +0 -2
@@ -478,7 +478,6 @@ static void __noreturn idle_play_dead(void) registeruint64_t addr; registervoid (*init_fn)(void ); -idle_task_exit ();local_irq_enable ();set_csr_ecfg (ECFGF_IPI );__this_cpu_write (cpu_state,CPU_DEAD );
@@ -503,7 +502,6 @@ static void __noreturn poll_play_dead(void) registeruint64_t addr; registervoid (*init_fn)(void ); -idle_task_exit ();__this_cpu_write (cpu_state,CPU_DEAD );__smp_mb ();
arch/mips/cavium-octeon/smp.c +0 -1
@@ -344,7 +344,6 @@ void play_dead(void) {int cpu =cpu_number_map (cvmx_get_core_num ()); -idle_task_exit ();cpuhp_ap_report_dead (); octeon_processor_boot =0xff ;per_cpu (cpu_state, cpu) =CPU_DEAD ;
arch/mips/kernel/smp-bmips.c +0 -1
@@ -391,7 +391,6 @@ static void bmips_cpu_die(unsigned int cpu)void __ref play_dead (void ) { -idle_task_exit ();cpuhp_ap_report_dead ();/* flush data cache */
arch/mips/kernel/smp-cps.c +0 -1
@@ -804,7 +804,6 @@ void play_dead(void)unsigned int cpu;local_irq_disable (); -idle_task_exit (); cpu =smp_processor_id (); cpu_death =CPU_DEATH_POWER ;
arch/mips/loongson64/smp.c +0 -1
@@ -766,7 +766,6 @@ void play_dead(void)unsigned int cpu =smp_processor_id ();void (*play_dead_at_ckseg1)(int *); -idle_task_exit ();cpuhp_ap_report_dead (); prid_imp =read_c0_prid () &PRID_IMP_MASK ;
arch/parisc/kernel/process.c +0 -2
@@ -164,8 +164,6 @@ EXPORT_SYMBOL(running_on_qemu);void __noreturn arch_cpu_idle_dead (void ) {#ifdef CONFIG_HOTPLUG_CPU -idle_task_exit (); -local_irq_disable ();/* Tell the core that this CPU is now safe to dispose of. */
arch/powerpc/platforms/85xx/smp.c +0 -2
@@ -121,8 +121,6 @@ static void smp_85xx_cpu_offline_self(void)/* mask all irqs to prevent cpu wakeup */ qoriq_pm_ops->irq_mask (cpu); -idle_task_exit (); -mtspr (SPRN_TCR ,0 );mtspr (SPRN_TSR ,mfspr (SPRN_TSR ));
arch/powerpc/platforms/powermac/smp.c +0 -2
@@ -925,7 +925,6 @@ static void pmac_cpu_offline_self(void)int cpu =smp_processor_id ();local_irq_disable (); -idle_task_exit ();pr_debug ("CPU%d offline\n" , cpu);generic_set_cpu_dead (cpu);smp_wmb ();
@@ -940,7 +939,6 @@ static void pmac_cpu_offline_self(void)int cpu =smp_processor_id ();local_irq_disable (); -idle_task_exit ();/* * turn off as much as possible, we'll be
arch/powerpc/platforms/powernv/smp.c +0 -1
@@ -172,7 +172,6 @@ static void pnv_cpu_offline_self(void)/* Standard hot unplug procedure */ -idle_task_exit (); cpu =smp_processor_id ();DBG ("CPU%d offline\n" , cpu);generic_set_cpu_dead (cpu);
arch/powerpc/platforms/pseries/hotplug-cpu.c +0 -2
@@ -19,7 +19,6 @@#include <linux/kernel.h> #include <linux/interrupt.h> #include <linux/delay.h> -#include <linux/sched.h> /* for idle_task_exit */ #include <linux/sched/hotplug.h> #include <linux/cpu.h> #include <linux/of.h>
@@ -64,7 +63,6 @@ static void pseries_cpu_offline_self(void)unsigned int hwcpu =hard_smp_processor_id ();local_irq_disable (); -idle_task_exit ();if (xive_enabled ())xive_teardown_cpu ();else
arch/powerpc/platforms/pseries/pmem.c +0 -1
@@ -9,7 +9,6 @@#include <linux/kernel.h> #include <linux/interrupt.h> #include <linux/delay.h> -#include <linux/sched.h> /* for idle_task_exit */ #include <linux/sched/hotplug.h> #include <linux/cpu.h> #include <linux/of.h>
arch/riscv/kernel/cpu-hotplug.c +0 -2
@@ -66,8 +66,6 @@ void arch_cpuhp_cleanup_dead_cpu(unsigned int cpu)*/ void __noreturn arch_cpu_idle_dead (void ) { -idle_task_exit (); -cpuhp_ap_report_dead (); cpu_ops->cpu_stop ();
arch/s390/kernel/smp.c +0 -1
@@ -918,7 +918,6 @@ void __cpu_die(unsigned int cpu)void __noreturn cpu_die (void ) { -idle_task_exit ();pcpu_sigp_retry (this_cpu_ptr (&pcpu_devices),SIGP_STOP ,0 );for (;;) ; }
arch/sh/kernel/smp.c +0 -1
@@ -108,7 +108,6 @@ int native_cpu_disable(unsigned int cpu)void play_dead_common (void ) { -idle_task_exit ();irq_ctx_exit (raw_smp_processor_id ());mb ();
arch/sparc/kernel/smp_64.c +0 -2
@@ -1290,8 +1290,6 @@ void cpu_play_dead(void)int cpu =smp_processor_id ();unsigned long pstate; -idle_task_exit (); -if (tlb_type == hypervisor) {struct trap_per_cpu *tb = &trap_block[cpu];
arch/x86/kernel/smpboot.c +0 -2
@@ -1407,8 +1407,6 @@ int native_cpu_disable(void)void play_dead_common (void ) { -idle_task_exit (); -cpuhp_ap_report_dead ();local_irq_disable ();
arch/xtensa/kernel/smp.c +0 -1
@@ -336,7 +336,6 @@ void __noreturn arch_cpu_idle_dead(void)*/ void __ref cpu_die (void ) { -idle_task_exit ();local_irq_disable (); __asm__ __volatile__( " movi a2, cpu_restart\n"
include/linux/sched/hotplug.h +0 -2
@@ -18,6 +18,4 @@ extern int sched_cpu_dying(unsigned int cpu);# define sched_cpu_dying NULL#endif -static inline void idle_task_exit (void ) {} -#endif /* _LINUX_SCHED_HOTPLUG_H */
Signature · 1 line
2.52.0
[email protected]
AI reviewSashiko has reviewed this patch and found no issues. It looks great!
Quoted 11 lines
Commit
21641bd9a7a7("lazy tlb: fix hotplug exit race withMMU_LAZY_TLB_SHOOTDOWN") moved the handling previously performed byidle_task_exit()into the scheduler CPU hotplug path usingsched_force_init_mm().As a result,
idle_task_exit()is now an empty stub and the remaining architecture call sites have no effect.Remove the calls to
idle_task_exit()and the now unused stub.Signed-off-by Srikar Dronamraju <[email protected]>
Sashiko has reviewed this patch and found no issues. It looks great!
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
Quoted 11 lines · Srikar Dronamraju
Commit
21641bd9a7a7("lazy tlb: fix hotplug exit race withMMU_LAZY_TLB_SHOOTDOWN") moved the handling previously performed byidle_task_exit()into the scheduler CPU hotplug path usingsched_force_init_mm().As a result,
idle_task_exit()is now an empty stub and the remaining architecture call sites have no effect.Remove the calls to
idle_task_exit()and the now unused stub.Signed-off-by Srikar Dronamraju <[email protected]>
Signature · 2 lines
Frederic Weisbecker SUSE Labs
Quoted 6 lines · Frederic Weisbecker
Quoted 5 lines · Srikar Dronamraju
Commit
21641bd9a7a7("lazy tlb: fix hotplug exit race withMMU_LAZY_TLB_SHOOTDOWN") moved the handling previously performed byidle_task_exit()into the scheduler CPU hotplug path usingsched_force_init_mm().
Quoted 8 lines
Quoted 6 lines
As a result,
idle_task_exit()is now an empty stub and the remaining architecture call sites have no effect.Remove the calls to
idle_task_exit()and the now unused stub.Signed-off-by Srikar Dronamraju <[email protected]>Reviewed-by Frederic Weisbecker <[email protected]>
Excellent; less is more and all that. Shall I take this through the scheduler tree?
Quoted 10 lines · Peter Zijlstra
Quoted 9 lines · Frederic Weisbecker
Quoted 8 lines · Srikar Dronamraju
Commit
21641bd9a7a7("lazy tlb: fix hotplug exit race withMMU_LAZY_TLB_SHOOTDOWN") moved the handling previously performed byidle_task_exit()into the scheduler CPU hotplug path usingsched_force_init_mm().As a result,
idle_task_exit()is now an empty stub and the remaining architecture call sites have no effect.
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
Remove the calls to
idle_task_exit()and the now unused stub.Signed-off-by Srikar Dronamraju <[email protected]>Reviewed-by Frederic Weisbecker <[email protected]>Excellent; less is more and all that. Shall I take this through the scheduler tree?
Yes please :-)
Signature · 2 lines
Frederic Weisbecker SUSE Labs
Quoted 7 lines · Srikar Dronamraju
Commit
21641bd9a7a7("lazy tlb: fix hotplug exit race withMMU_LAZY_TLB_SHOOTDOWN") moved the handling previously performed byidle_task_exit()into the scheduler CPU hotplug path usingsched_force_init_mm().As a result,
idle_task_exit()is now an empty stub and the remaining architecture call sites have no effect.
Quoted 311 lines
Remove the calls to
idle_task_exit()and the now unused stub.Signed-off-by Srikar Dronamraju <[email protected]>--- arch/arm/kernel/smp.c | 2 -- arch/arm64/kernel/smp.c | 2 -- arch/csky/kernel/smp.c | 2 -- arch/loongarch/kernel/smp.c | 2 -- arch/mips/cavium-octeon/smp.c | 1 - arch/mips/kernel/smp-bmips.c | 1 - arch/mips/kernel/smp-cps.c | 1 - arch/mips/loongson64/smp.c | 1 - arch/parisc/kernel/process.c | 2 -- arch/powerpc/platforms/85xx/smp.c | 2 -- arch/powerpc/platforms/powermac/smp.c | 2 -- arch/powerpc/platforms/powernv/smp.c | 1 - arch/powerpc/platforms/pseries/hotplug-cpu.c | 2 -- arch/powerpc/platforms/pseries/pmem.c | 1 - arch/riscv/kernel/cpu-hotplug.c | 2 -- arch/s390/kernel/smp.c | 1 - arch/sh/kernel/smp.c | 1 - arch/sparc/kernel/smp_64.c | 2 -- arch/x86/kernel/smpboot.c | 2 -- arch/xtensa/kernel/smp.c | 1 - include/linux/sched/hotplug.h | 2 -- 21 files changed, 33 deletions(-)arch/arm/kernel/smp.c +0
-2@@ -319,8 +319,6 @@ void __noreturn arch_cpu_idle_dead(void) {unsigned int cpu =smp_processor_id (); -idle_task_exit (); -local_irq_disable ();/* arch/arm64/kernel/smp.c +0
-2@@ -370,8 +370,6 @@ void __noreturn cpu_die(void)unsigned int cpu =smp_processor_id ();const struct cpu_operations *ops =get_cpu_ops (cpu); -idle_task_exit (); -local_daif_mask ();/* Tell cpuhp_bp_sync_dead() that this CPU is now safe to dispose of */ arch/csky/kernel/smp.c +0
-2@@ -294,8 +294,6 @@ void arch_cpuhp_cleanup_dead_cpu(unsigned int cpu)void __noreturn arch_cpu_idle_dead (void ) { -idle_task_exit (); -cpuhp_ap_report_dead ();while (!secondary_stack)arch/loongarch/kernel/smp.c +0
-2@@ -478,7 +478,6 @@ static void __noreturn idle_play_dead(void) registeruint64_t addr; registervoid (*init_fn)(void ); -idle_task_exit ();local_irq_enable ();set_csr_ecfg (ECFGF_IPI );__this_cpu_write (cpu_state,CPU_DEAD );@@ -503,7 +502,6 @@ static void __noreturn poll_play_dead(void) registeruint64_t addr; registervoid (*init_fn)(void ); -idle_task_exit ();__this_cpu_write (cpu_state,CPU_DEAD );__smp_mb ();arch/mips/cavium-octeon/smp.c +0
-1@@ -344,7 +344,6 @@ void play_dead(void) {int cpu =cpu_number_map (cvmx_get_core_num ()); -idle_task_exit ();cpuhp_ap_report_dead (); octeon_processor_boot =0xff ;per_cpu (cpu_state, cpu) =CPU_DEAD ;arch/mips/kernel/smp-bmips.c +0
-1@@ -391,7 +391,6 @@ static void bmips_cpu_die(unsigned int cpu)void __ref play_dead (void ) { -idle_task_exit ();cpuhp_ap_report_dead ();/* flush data cache */ arch/mips/kernel/smp-cps.c +0
-1@@ -804,7 +804,6 @@ void play_dead(void)unsigned int cpu;local_irq_disable (); -idle_task_exit (); cpu =smp_processor_id (); cpu_death =CPU_DEATH_POWER ;arch/mips/loongson64/smp.c +0
-1@@ -766,7 +766,6 @@ void play_dead(void)unsigned int cpu =smp_processor_id ();void (*play_dead_at_ckseg1)(int *); -idle_task_exit ();cpuhp_ap_report_dead (); prid_imp =read_c0_prid () &PRID_IMP_MASK ;arch/parisc/kernel/process.c +0
-2@@ -164,8 +164,6 @@ EXPORT_SYMBOL(running_on_qemu);void __noreturn arch_cpu_idle_dead (void ) {#ifdef CONFIG_HOTPLUG_CPU -idle_task_exit (); -local_irq_disable ();/* Tell the core that this CPU is now safe to dispose of. */ arch/powerpc/platforms/85xx/smp.c +0
-2@@ -121,8 +121,6 @@ static void smp_85xx_cpu_offline_self(void)/* mask all irqs to prevent cpu wakeup */ qoriq_pm_ops->irq_mask (cpu); -idle_task_exit (); -mtspr (SPRN_TCR ,0 );mtspr (SPRN_TSR ,mfspr (SPRN_TSR ));arch/powerpc/platforms/powermac/smp.c +0
-2@@ -925,7 +925,6 @@ static void pmac_cpu_offline_self(void)int cpu =smp_processor_id ();local_irq_disable (); -idle_task_exit ();pr_debug ("CPU%d offline\n" , cpu);generic_set_cpu_dead (cpu);smp_wmb ();@@ -940,7 +939,6 @@ static void pmac_cpu_offline_self(void)int cpu =smp_processor_id ();local_irq_disable (); -idle_task_exit ();/* * turn off as much as possible, we'll be arch/powerpc/platforms/powernv/smp.c +0
-1@@ -172,7 +172,6 @@ static void pnv_cpu_offline_self(void)/* Standard hot unplug procedure */ -idle_task_exit (); cpu =smp_processor_id ();DBG ("CPU%d offline\n" , cpu);generic_set_cpu_dead (cpu);arch/powerpc/platforms/pseries/hotplug-cpu.c +0
-2@@ -19,7 +19,6 @@#include <linux/kernel.h> #include <linux/interrupt.h> #include <linux/delay.h> -#include <linux/sched.h> /* for idle_task_exit */ #include <linux/sched/hotplug.h> #include <linux/cpu.h> #include <linux/of.h> @@ -64,7 +63,6 @@ static void pseries_cpu_offline_self(void)unsigned int hwcpu =hard_smp_processor_id ();local_irq_disable (); -idle_task_exit ();if (xive_enabled ())xive_teardown_cpu ();else arch/powerpc/platforms/pseries/pmem.c +0
-1@@ -9,7 +9,6 @@#include <linux/kernel.h> #include <linux/interrupt.h> #include <linux/delay.h> -#include <linux/sched.h> /* for idle_task_exit */ #include <linux/sched/hotplug.h> #include <linux/cpu.h> #include <linux/of.h> arch/riscv/kernel/cpu-hotplug.c +0
-2@@ -66,8 +66,6 @@ void arch_cpuhp_cleanup_dead_cpu(unsigned int cpu)*/ void __noreturn arch_cpu_idle_dead (void ) { -idle_task_exit (); -cpuhp_ap_report_dead (); cpu_ops->cpu_stop ();arch/s390/kernel/smp.c +0
-1@@ -918,7 +918,6 @@ void __cpu_die(unsigned int cpu)void __noreturn cpu_die (void ) { -idle_task_exit ();pcpu_sigp_retry (this_cpu_ptr (&pcpu_devices),SIGP_STOP ,0 );for (;;) ; }arch/sh/kernel/smp.c +0
-1@@ -108,7 +108,6 @@ int native_cpu_disable(unsigned int cpu)void play_dead_common (void ) { -idle_task_exit ();irq_ctx_exit (raw_smp_processor_id ());mb ();arch/sparc/kernel/smp_64.c +0
-2@@ -1290,8 +1290,6 @@ void cpu_play_dead(void)int cpu =smp_processor_id ();unsigned long pstate; -idle_task_exit (); -if (tlb_type == hypervisor) {struct trap_per_cpu *tb = &trap_block[cpu];arch/x86/kernel/smpboot.c +0
-2@@ -1407,8 +1407,6 @@ int native_cpu_disable(void)void play_dead_common (void ) { -idle_task_exit (); -cpuhp_ap_report_dead ();local_irq_disable ();arch/xtensa/kernel/smp.c +0
-1@@ -336,7 +336,6 @@ void __noreturn arch_cpu_idle_dead(void)*/ void __ref cpu_die (void ) { -idle_task_exit ();local_irq_disable (); __asm__ __volatile__( " movi a2, cpu_restart\n"include/linux/sched/hotplug.h +0
-2@@ -18,6 +18,4 @@ extern int sched_cpu_dying(unsigned int cpu);# define sched_cpu_dying NULL#endif -static inline void idle_task_exit (void ) {} -#endif /* _LINUX_SCHED_HOTPLUG_H */
Signature · 2 lines
Best regards, Jinjie
The following commit has been merged into the sched/core branch of tip:
The following commit has been merged into the sched/core branch of tip:
Commit-ID: 3ab90dd656a7995e26b9aa0e00a9a89ed9b880b3 Gitweb: https://git.kernel.org/tip/3ab90dd656a7995e26b9aa0e00a9a89ed9b880b3 Author: Srikar Dronamraju <[email protected]> AuthorDate: Fri, 16 Oct 2026 15:26:40 +05:30 Committer: Peter Zijlstra <[email protected]> CommitterDate: Mon, 09 Nov 2026 09:39:59 +01:00
sched/hotplug: Remove unused idle_task_exit
Commit 21641bd9a7a7 ("lazy tlb: fix hotplug exit race with MMU_LAZY_TLB_SHOOTDOWN") moved the handling previously performed by idle_task_exit() into the scheduler CPU hotplug path using sched_force_init_mm().
As a result, idle_task_exit() is now an empty stub and the remaining architecture call sites have no effect.
Remove the calls to idle_task_exit() and the now unused stub.
--- arch/arm/kernel/smp.c | 2 -- arch/arm64/kernel/smp.c | 2 -- arch/csky/kernel/smp.c | 2 -- arch/loongarch/kernel/smp.c | 2 -- arch/mips/cavium-octeon/smp.c | 1 - arch/mips/kernel/smp-bmips.c | 1 - arch/mips/kernel/smp-cps.c | 1 - arch/mips/loongson64/smp.c | 1 - arch/parisc/kernel/process.c | 2 -- arch/powerpc/platforms/85xx/smp.c | 2 -- arch/powerpc/platforms/powermac/smp.c | 2 -- arch/powerpc/platforms/powernv/smp.c | 1 - arch/powerpc/platforms/pseries/hotplug-cpu.c | 2 -- arch/powerpc/platforms/pseries/pmem.c | 1 - arch/riscv/kernel/cpu-hotplug.c | 2 -- arch/s390/kernel/smp.c | 1 - arch/sh/kernel/smp.c | 1 - arch/sparc/kernel/smp_64.c | 2 -- arch/x86/kernel/smpboot.c | 2 -- arch/xtensa/kernel/smp.c | 1 - include/linux/sched/hotplug.h | 2 -- 21 files changed, 33 deletions(-)
arch/arm/kernel/smp.c +0 -2
@@ -319,8 +319,6 @@ void __noreturn arch_cpu_idle_dead(void) {unsigned int cpu =smp_processor_id (); -idle_task_exit (); -local_irq_disable ();/*
arch/arm64/kernel/smp.c +0 -2
@@ -372,8 +372,6 @@ void __noreturn cpu_die(void)unsigned int cpu =smp_processor_id ();const struct cpu_operations *ops =get_cpu_ops (cpu); -idle_task_exit (); -local_daif_mask ();/* Tell cpuhp_bp_sync_dead() that this CPU is now safe to dispose of */
arch/csky/kernel/smp.c +0 -2
@@ -294,8 +294,6 @@ void arch_cpuhp_cleanup_dead_cpu(unsigned int cpu)void __noreturn arch_cpu_idle_dead (void ) { -idle_task_exit (); -cpuhp_ap_report_dead ();while (!secondary_stack)
arch/loongarch/kernel/smp.c +0 -2
@@ -478,7 +478,6 @@ static void __noreturn idle_play_dead(void) registeruint64_t addr; registervoid (*init_fn)(void ); -idle_task_exit ();local_irq_enable ();set_csr_ecfg (ECFGF_IPI );__this_cpu_write (cpu_state,CPU_DEAD );
@@ -503,7 +502,6 @@ static void __noreturn poll_play_dead(void) registeruint64_t addr; registervoid (*init_fn)(void ); -idle_task_exit ();__this_cpu_write (cpu_state,CPU_DEAD );__smp_mb ();
arch/mips/cavium-octeon/smp.c +0 -1
@@ -344,7 +344,6 @@ void play_dead(void) {int cpu =cpu_number_map (cvmx_get_core_num ()); -idle_task_exit ();cpuhp_ap_report_dead (); octeon_processor_boot =0xff ;per_cpu (cpu_state, cpu) =CPU_DEAD ;
arch/mips/kernel/smp-bmips.c +0 -1
@@ -391,7 +391,6 @@ static void bmips_cpu_die(unsigned int cpu)void __ref play_dead (void ) { -idle_task_exit ();cpuhp_ap_report_dead ();/* flush data cache */
arch/mips/kernel/smp-cps.c +0 -1
@@ -804,7 +804,6 @@ void play_dead(void)unsigned int cpu;local_irq_disable (); -idle_task_exit (); cpu =smp_processor_id (); cpu_death =CPU_DEATH_POWER ;
arch/mips/loongson64/smp.c +0 -1
@@ -766,7 +766,6 @@ void play_dead(void)unsigned int cpu =smp_processor_id ();void (*play_dead_at_ckseg1)(int *); -idle_task_exit ();cpuhp_ap_report_dead (); prid_imp =read_c0_prid () &PRID_IMP_MASK ;
arch/parisc/kernel/process.c +0 -2
@@ -164,8 +164,6 @@ EXPORT_SYMBOL(running_on_qemu);void __noreturn arch_cpu_idle_dead (void ) {#ifdef CONFIG_HOTPLUG_CPU -idle_task_exit (); -local_irq_disable ();/* Tell the core that this CPU is now safe to dispose of. */
arch/powerpc/platforms/85xx/smp.c +0 -2
@@ -121,8 +121,6 @@ static void smp_85xx_cpu_offline_self(void)/* mask all irqs to prevent cpu wakeup */ qoriq_pm_ops->irq_mask (cpu); -idle_task_exit (); -mtspr (SPRN_TCR ,0 );mtspr (SPRN_TSR ,mfspr (SPRN_TSR ));
arch/powerpc/platforms/powermac/smp.c +0 -2
@@ -925,7 +925,6 @@ static void pmac_cpu_offline_self(void)int cpu =smp_processor_id ();local_irq_disable (); -idle_task_exit ();pr_debug ("CPU%d offline\n" , cpu);generic_set_cpu_dead (cpu);smp_wmb ();
@@ -940,7 +939,6 @@ static void pmac_cpu_offline_self(void)int cpu =smp_processor_id ();local_irq_disable (); -idle_task_exit ();/* * turn off as much as possible, we'll be
arch/powerpc/platforms/powernv/smp.c +0 -1
@@ -172,7 +172,6 @@ static void pnv_cpu_offline_self(void)/* Standard hot unplug procedure */ -idle_task_exit (); cpu =smp_processor_id ();DBG ("CPU%d offline\n" , cpu);generic_set_cpu_dead (cpu);
arch/powerpc/platforms/pseries/hotplug-cpu.c +0 -2
@@ -19,7 +19,6 @@#include <linux/kernel.h> #include <linux/interrupt.h> #include <linux/delay.h> -#include <linux/sched.h> /* for idle_task_exit */ #include <linux/sched/hotplug.h> #include <linux/cpu.h> #include <linux/of.h>
@@ -64,7 +63,6 @@ static void pseries_cpu_offline_self(void)unsigned int hwcpu =hard_smp_processor_id ();local_irq_disable (); -idle_task_exit ();if (xive_enabled ())xive_teardown_cpu ();else
arch/powerpc/platforms/pseries/pmem.c +0 -1
@@ -9,7 +9,6 @@#include <linux/kernel.h> #include <linux/interrupt.h> #include <linux/delay.h> -#include <linux/sched.h> /* for idle_task_exit */ #include <linux/sched/hotplug.h> #include <linux/cpu.h> #include <linux/of.h>
arch/riscv/kernel/cpu-hotplug.c +0 -2
@@ -66,8 +66,6 @@ void arch_cpuhp_cleanup_dead_cpu(unsigned int cpu)*/ void __noreturn arch_cpu_idle_dead (void ) { -idle_task_exit (); -cpuhp_ap_report_dead (); cpu_ops->cpu_stop ();
arch/s390/kernel/smp.c +0 -1
@@ -918,7 +918,6 @@ void __cpu_die(unsigned int cpu)void __noreturn cpu_die (void ) { -idle_task_exit ();pcpu_sigp_retry (this_cpu_ptr (&pcpu_devices),SIGP_STOP ,0 );for (;;) ; }
arch/sh/kernel/smp.c +0 -1
@@ -108,7 +108,6 @@ int native_cpu_disable(unsigned int cpu)void play_dead_common (void ) { -idle_task_exit ();irq_ctx_exit (raw_smp_processor_id ());mb ();
arch/sparc/kernel/smp_64.c +0 -2
@@ -1290,8 +1290,6 @@ void cpu_play_dead(void)int cpu =smp_processor_id ();unsigned long pstate; -idle_task_exit (); -if (tlb_type == hypervisor) {struct trap_per_cpu *tb = &trap_block[cpu];
arch/x86/kernel/smpboot.c +0 -2
@@ -1407,8 +1407,6 @@ int native_cpu_disable(void)void play_dead_common (void ) { -idle_task_exit (); -cpuhp_ap_report_dead ();local_irq_disable ();
arch/xtensa/kernel/smp.c +0 -1
@@ -336,7 +336,6 @@ void __noreturn arch_cpu_idle_dead(void)*/ void __ref cpu_die (void ) { -idle_task_exit ();local_irq_disable (); __asm__ __volatile__( " movi a2, cpu_restart\n"
include/linux/sched/hotplug.h +0 -2
@@ -18,6 +18,4 @@ extern int sched_cpu_dying(unsigned int cpu);# define sched_cpu_dying NULL#endif -static inline void idle_task_exit (void ) {} -#endif /* _LINUX_SCHED_HOTPLUG_H */
The following commit has been merged into the sched/core branch of tip:
The following commit has been merged into the sched/core branch of tip:
Commit-ID: 4acfb1255f30a1ed9ea07f9e9a650ebc064aa2eb Gitweb: https://git.kernel.org/tip/4acfb1255f30a1ed9ea07f9e9a650ebc064aa2eb Author: Srikar Dronamraju <[email protected]> AuthorDate: Fri, 16 Oct 2026 15:26:40 +05:30 Committer: Ingo Molnar <[email protected]> CommitterDate: Mon, 09 Nov 2026 10:24:01 +01:00
sched/hotplug: Remove unused idle_task_exit
Commit 21641bd9a7a7 ("lazy tlb: fix hotplug exit race with MMU_LAZY_TLB_SHOOTDOWN") moved the handling previously performed by idle_task_exit() into the scheduler CPU hotplug path using sched_force_init_mm().
As a result, idle_task_exit() is now an empty stub and the remaining architecture call sites have no effect.
Remove the calls to idle_task_exit() and the now unused stub.
--- arch/arm/kernel/smp.c | 2 -- arch/arm64/kernel/smp.c | 2 -- arch/csky/kernel/smp.c | 2 -- arch/loongarch/kernel/smp.c | 2 -- arch/mips/cavium-octeon/smp.c | 1 - arch/mips/kernel/smp-bmips.c | 1 - arch/mips/kernel/smp-cps.c | 1 - arch/mips/loongson64/smp.c | 1 - arch/parisc/kernel/process.c | 2 -- arch/powerpc/platforms/85xx/smp.c | 2 -- arch/powerpc/platforms/powermac/smp.c | 2 -- arch/powerpc/platforms/powernv/smp.c | 1 - arch/powerpc/platforms/pseries/hotplug-cpu.c | 2 -- arch/powerpc/platforms/pseries/pmem.c | 1 - arch/riscv/kernel/cpu-hotplug.c | 2 -- arch/s390/kernel/smp.c | 1 - arch/sh/kernel/smp.c | 1 - arch/sparc/kernel/smp_64.c | 2 -- arch/x86/kernel/smpboot.c | 2 -- arch/xtensa/kernel/smp.c | 1 - include/linux/sched/hotplug.h | 2 -- 21 files changed, 33 deletions(-)
arch/arm/kernel/smp.c +0 -2
@@ -319,8 +319,6 @@ void __noreturn arch_cpu_idle_dead(void) {unsigned int cpu =smp_processor_id (); -idle_task_exit (); -local_irq_disable ();/*
arch/arm64/kernel/smp.c +0 -2
@@ -372,8 +372,6 @@ void __noreturn cpu_die(void)unsigned int cpu =smp_processor_id ();const struct cpu_operations *ops =get_cpu_ops (cpu); -idle_task_exit (); -local_daif_mask ();/* Tell cpuhp_bp_sync_dead() that this CPU is now safe to dispose of */
arch/csky/kernel/smp.c +0 -2
@@ -294,8 +294,6 @@ void arch_cpuhp_cleanup_dead_cpu(unsigned int cpu)void __noreturn arch_cpu_idle_dead (void ) { -idle_task_exit (); -cpuhp_ap_report_dead ();while (!secondary_stack)
arch/loongarch/kernel/smp.c +0 -2
@@ -478,7 +478,6 @@ static void __noreturn idle_play_dead(void) registeruint64_t addr; registervoid (*init_fn)(void ); -idle_task_exit ();local_irq_enable ();set_csr_ecfg (ECFGF_IPI );__this_cpu_write (cpu_state,CPU_DEAD );
@@ -503,7 +502,6 @@ static void __noreturn poll_play_dead(void) registeruint64_t addr; registervoid (*init_fn)(void ); -idle_task_exit ();__this_cpu_write (cpu_state,CPU_DEAD );__smp_mb ();
arch/mips/cavium-octeon/smp.c +0 -1
@@ -344,7 +344,6 @@ void play_dead(void) {int cpu =cpu_number_map (cvmx_get_core_num ()); -idle_task_exit ();cpuhp_ap_report_dead (); octeon_processor_boot =0xff ;per_cpu (cpu_state, cpu) =CPU_DEAD ;
arch/mips/kernel/smp-bmips.c +0 -1
@@ -391,7 +391,6 @@ static void bmips_cpu_die(unsigned int cpu)void __ref play_dead (void ) { -idle_task_exit ();cpuhp_ap_report_dead ();/* flush data cache */
arch/mips/kernel/smp-cps.c +0 -1
@@ -804,7 +804,6 @@ void play_dead(void)unsigned int cpu;local_irq_disable (); -idle_task_exit (); cpu =smp_processor_id (); cpu_death =CPU_DEATH_POWER ;
arch/mips/loongson64/smp.c +0 -1
@@ -766,7 +766,6 @@ void play_dead(void)unsigned int cpu =smp_processor_id ();void (*play_dead_at_ckseg1)(int *); -idle_task_exit ();cpuhp_ap_report_dead (); prid_imp =read_c0_prid () &PRID_IMP_MASK ;
arch/parisc/kernel/process.c +0 -2
@@ -164,8 +164,6 @@ EXPORT_SYMBOL(running_on_qemu);void __noreturn arch_cpu_idle_dead (void ) {#ifdef CONFIG_HOTPLUG_CPU -idle_task_exit (); -local_irq_disable ();/* Tell the core that this CPU is now safe to dispose of. */
arch/powerpc/platforms/85xx/smp.c +0 -2
@@ -121,8 +121,6 @@ static void smp_85xx_cpu_offline_self(void)/* mask all irqs to prevent cpu wakeup */ qoriq_pm_ops->irq_mask (cpu); -idle_task_exit (); -mtspr (SPRN_TCR ,0 );mtspr (SPRN_TSR ,mfspr (SPRN_TSR ));
arch/powerpc/platforms/powermac/smp.c +0 -2
@@ -925,7 +925,6 @@ static void pmac_cpu_offline_self(void)int cpu =smp_processor_id ();local_irq_disable (); -idle_task_exit ();pr_debug ("CPU%d offline\n" , cpu);generic_set_cpu_dead (cpu);smp_wmb ();
@@ -940,7 +939,6 @@ static void pmac_cpu_offline_self(void)int cpu =smp_processor_id ();local_irq_disable (); -idle_task_exit ();/* * turn off as much as possible, we'll be
arch/powerpc/platforms/powernv/smp.c +0 -1
@@ -172,7 +172,6 @@ static void pnv_cpu_offline_self(void)/* Standard hot unplug procedure */ -idle_task_exit (); cpu =smp_processor_id ();DBG ("CPU%d offline\n" , cpu);generic_set_cpu_dead (cpu);
arch/powerpc/platforms/pseries/hotplug-cpu.c +0 -2
@@ -19,7 +19,6 @@#include <linux/kernel.h> #include <linux/interrupt.h> #include <linux/delay.h> -#include <linux/sched.h> /* for idle_task_exit */ #include <linux/sched/hotplug.h> #include <linux/cpu.h> #include <linux/of.h>
@@ -64,7 +63,6 @@ static void pseries_cpu_offline_self(void)unsigned int hwcpu =hard_smp_processor_id ();local_irq_disable (); -idle_task_exit ();if (xive_enabled ())xive_teardown_cpu ();else
arch/powerpc/platforms/pseries/pmem.c +0 -1
@@ -9,7 +9,6 @@#include <linux/kernel.h> #include <linux/interrupt.h> #include <linux/delay.h> -#include <linux/sched.h> /* for idle_task_exit */ #include <linux/sched/hotplug.h> #include <linux/cpu.h> #include <linux/of.h>
arch/riscv/kernel/cpu-hotplug.c +0 -2
@@ -66,8 +66,6 @@ void arch_cpuhp_cleanup_dead_cpu(unsigned int cpu)*/ void __noreturn arch_cpu_idle_dead (void ) { -idle_task_exit (); -cpuhp_ap_report_dead (); cpu_ops->cpu_stop ();
arch/s390/kernel/smp.c +0 -1
@@ -918,7 +918,6 @@ void __cpu_die(unsigned int cpu)void __noreturn cpu_die (void ) { -idle_task_exit ();pcpu_sigp_retry (this_cpu_ptr (&pcpu_devices),SIGP_STOP ,0 );for (;;) ; }
arch/sh/kernel/smp.c +0 -1
@@ -108,7 +108,6 @@ int native_cpu_disable(unsigned int cpu)void play_dead_common (void ) { -idle_task_exit ();irq_ctx_exit (raw_smp_processor_id ());mb ();
arch/sparc/kernel/smp_64.c +0 -2
@@ -1290,8 +1290,6 @@ void cpu_play_dead(void)int cpu =smp_processor_id ();unsigned long pstate; -idle_task_exit (); -if (tlb_type == hypervisor) {struct trap_per_cpu *tb = &trap_block[cpu];
arch/x86/kernel/smpboot.c +0 -2
@@ -1407,8 +1407,6 @@ int native_cpu_disable(void)void play_dead_common (void ) { -idle_task_exit (); -cpuhp_ap_report_dead ();local_irq_disable ();
arch/xtensa/kernel/smp.c +0 -1
@@ -336,7 +336,6 @@ void __noreturn arch_cpu_idle_dead(void)*/ void __ref cpu_die (void ) { -idle_task_exit ();local_irq_disable (); __asm__ __volatile__( " movi a2, cpu_restart\n"
include/linux/sched/hotplug.h +0 -2
@@ -18,6 +18,4 @@ extern int sched_cpu_dying(unsigned int cpu);# define sched_cpu_dying NULL#endif -static inline void idle_task_exit (void ) {} -#endif /* _LINUX_SCHED_HOTPLUG_H */
The following commit has been merged into the sched/core branch of tip:
The following commit has been merged into the sched/core branch of tip:
Commit-ID: 879ebf19774f8338fb27257c21d2bc94caae97d0 Gitweb: https://git.kernel.org/tip/879ebf19774f8338fb27257c21d2bc94caae97d0 Author: Srikar Dronamraju <[email protected]> AuthorDate: Fri, 16 Oct 2026 15:26:40 +05:30 Committer: Ingo Molnar <[email protected]> CommitterDate: Mon, 09 Nov 2026 10:58:06 +01:00
sched/hotplug: Remove unused idle_task_exit
Commit 21641bd9a7a7 ("lazy tlb: fix hotplug exit race with MMU_LAZY_TLB_SHOOTDOWN") moved the handling previously performed by idle_task_exit() into the scheduler CPU hotplug path using sched_force_init_mm().
As a result, idle_task_exit() is now an empty stub and the remaining architecture call sites have no effect.
Remove the calls to idle_task_exit() and the now unused stub.
--- arch/arm/kernel/smp.c | 2 -- arch/arm64/kernel/smp.c | 2 -- arch/csky/kernel/smp.c | 2 -- arch/loongarch/kernel/smp.c | 2 -- arch/mips/cavium-octeon/smp.c | 1 - arch/mips/kernel/smp-bmips.c | 1 - arch/mips/kernel/smp-cps.c | 1 - arch/mips/loongson64/smp.c | 1 - arch/parisc/kernel/process.c | 2 -- arch/powerpc/platforms/85xx/smp.c | 2 -- arch/powerpc/platforms/powermac/smp.c | 2 -- arch/powerpc/platforms/powernv/smp.c | 1 - arch/powerpc/platforms/pseries/hotplug-cpu.c | 2 -- arch/powerpc/platforms/pseries/pmem.c | 1 - arch/riscv/kernel/cpu-hotplug.c | 2 -- arch/s390/kernel/smp.c | 1 - arch/sh/kernel/smp.c | 1 - arch/sparc/kernel/smp_64.c | 2 -- arch/x86/kernel/smpboot.c | 2 -- arch/xtensa/kernel/smp.c | 1 - include/linux/sched/hotplug.h | 2 -- 21 files changed, 33 deletions(-)
arch/arm/kernel/smp.c +0 -2
@@ -319,8 +319,6 @@ void __noreturn arch_cpu_idle_dead(void) {unsigned int cpu =smp_processor_id (); -idle_task_exit (); -local_irq_disable ();/*
arch/arm64/kernel/smp.c +0 -2
@@ -372,8 +372,6 @@ void __noreturn cpu_die(void)unsigned int cpu =smp_processor_id ();const struct cpu_operations *ops =get_cpu_ops (cpu); -idle_task_exit (); -local_daif_mask ();/* Tell cpuhp_bp_sync_dead() that this CPU is now safe to dispose of */
arch/csky/kernel/smp.c +0 -2
@@ -294,8 +294,6 @@ void arch_cpuhp_cleanup_dead_cpu(unsigned int cpu)void __noreturn arch_cpu_idle_dead (void ) { -idle_task_exit (); -cpuhp_ap_report_dead ();while (!secondary_stack)
arch/loongarch/kernel/smp.c +0 -2
@@ -478,7 +478,6 @@ static void __noreturn idle_play_dead(void) registeruint64_t addr; registervoid (*init_fn)(void ); -idle_task_exit ();local_irq_enable ();set_csr_ecfg (ECFGF_IPI );__this_cpu_write (cpu_state,CPU_DEAD );
@@ -503,7 +502,6 @@ static void __noreturn poll_play_dead(void) registeruint64_t addr; registervoid (*init_fn)(void ); -idle_task_exit ();__this_cpu_write (cpu_state,CPU_DEAD );__smp_mb ();
arch/mips/cavium-octeon/smp.c +0 -1
@@ -344,7 +344,6 @@ void play_dead(void) {int cpu =cpu_number_map (cvmx_get_core_num ()); -idle_task_exit ();cpuhp_ap_report_dead (); octeon_processor_boot =0xff ;per_cpu (cpu_state, cpu) =CPU_DEAD ;
arch/mips/kernel/smp-bmips.c +0 -1
@@ -391,7 +391,6 @@ static void bmips_cpu_die(unsigned int cpu)void __ref play_dead (void ) { -idle_task_exit ();cpuhp_ap_report_dead ();/* flush data cache */
arch/mips/kernel/smp-cps.c +0 -1
@@ -804,7 +804,6 @@ void play_dead(void)unsigned int cpu;local_irq_disable (); -idle_task_exit (); cpu =smp_processor_id (); cpu_death =CPU_DEATH_POWER ;
arch/mips/loongson64/smp.c +0 -1
@@ -766,7 +766,6 @@ void play_dead(void)unsigned int cpu =smp_processor_id ();void (*play_dead_at_ckseg1)(int *); -idle_task_exit ();cpuhp_ap_report_dead (); prid_imp =read_c0_prid () &PRID_IMP_MASK ;
arch/parisc/kernel/process.c +0 -2
@@ -164,8 +164,6 @@ EXPORT_SYMBOL(running_on_qemu);void __noreturn arch_cpu_idle_dead (void ) {#ifdef CONFIG_HOTPLUG_CPU -idle_task_exit (); -local_irq_disable ();/* Tell the core that this CPU is now safe to dispose of. */
arch/powerpc/platforms/85xx/smp.c +0 -2
@@ -121,8 +121,6 @@ static void smp_85xx_cpu_offline_self(void)/* mask all irqs to prevent cpu wakeup */ qoriq_pm_ops->irq_mask (cpu); -idle_task_exit (); -mtspr (SPRN_TCR ,0 );mtspr (SPRN_TSR ,mfspr (SPRN_TSR ));
arch/powerpc/platforms/powermac/smp.c +0 -2
@@ -925,7 +925,6 @@ static void pmac_cpu_offline_self(void)int cpu =smp_processor_id ();local_irq_disable (); -idle_task_exit ();pr_debug ("CPU%d offline\n" , cpu);generic_set_cpu_dead (cpu);smp_wmb ();
@@ -940,7 +939,6 @@ static void pmac_cpu_offline_self(void)int cpu =smp_processor_id ();local_irq_disable (); -idle_task_exit ();/* * turn off as much as possible, we'll be
arch/powerpc/platforms/powernv/smp.c +0 -1
@@ -172,7 +172,6 @@ static void pnv_cpu_offline_self(void)/* Standard hot unplug procedure */ -idle_task_exit (); cpu =smp_processor_id ();DBG ("CPU%d offline\n" , cpu);generic_set_cpu_dead (cpu);
arch/powerpc/platforms/pseries/hotplug-cpu.c +0 -2
@@ -19,7 +19,6 @@#include <linux/kernel.h> #include <linux/interrupt.h> #include <linux/delay.h> -#include <linux/sched.h> /* for idle_task_exit */ #include <linux/sched/hotplug.h> #include <linux/cpu.h> #include <linux/of.h>
@@ -64,7 +63,6 @@ static void pseries_cpu_offline_self(void)unsigned int hwcpu =hard_smp_processor_id ();local_irq_disable (); -idle_task_exit ();if (xive_enabled ())xive_teardown_cpu ();else
arch/powerpc/platforms/pseries/pmem.c +0 -1
@@ -9,7 +9,6 @@#include <linux/kernel.h> #include <linux/interrupt.h> #include <linux/delay.h> -#include <linux/sched.h> /* for idle_task_exit */ #include <linux/sched/hotplug.h> #include <linux/cpu.h> #include <linux/of.h>
arch/riscv/kernel/cpu-hotplug.c +0 -2
@@ -66,8 +66,6 @@ void arch_cpuhp_cleanup_dead_cpu(unsigned int cpu)*/ void __noreturn arch_cpu_idle_dead (void ) { -idle_task_exit (); -cpuhp_ap_report_dead (); cpu_ops->cpu_stop ();
arch/s390/kernel/smp.c +0 -1
@@ -918,7 +918,6 @@ void __cpu_die(unsigned int cpu)void __noreturn cpu_die (void ) { -idle_task_exit ();pcpu_sigp_retry (this_cpu_ptr (&pcpu_devices),SIGP_STOP ,0 );for (;;) ; }
arch/sh/kernel/smp.c +0 -1
@@ -108,7 +108,6 @@ int native_cpu_disable(unsigned int cpu)void play_dead_common (void ) { -idle_task_exit ();irq_ctx_exit (raw_smp_processor_id ());mb ();
arch/sparc/kernel/smp_64.c +0 -2
@@ -1290,8 +1290,6 @@ void cpu_play_dead(void)int cpu =smp_processor_id ();unsigned long pstate; -idle_task_exit (); -if (tlb_type == hypervisor) {struct trap_per_cpu *tb = &trap_block[cpu];
arch/x86/kernel/smpboot.c +0 -2
@@ -1407,8 +1407,6 @@ int native_cpu_disable(void)void play_dead_common (void ) { -idle_task_exit (); -cpuhp_ap_report_dead ();local_irq_disable ();
arch/xtensa/kernel/smp.c +0 -1
@@ -336,7 +336,6 @@ void __noreturn arch_cpu_idle_dead(void)*/ void __ref cpu_die (void ) { -idle_task_exit ();local_irq_disable (); __asm__ __volatile__( " movi a2, cpu_restart\n"
include/linux/sched/hotplug.h +0 -2
@@ -18,6 +18,4 @@ extern int sched_cpu_dying(unsigned int cpu);# define sched_cpu_dying NULL#endif -static inline void idle_task_exit (void ) {} -#endif /* _LINUX_SCHED_HOTPLUG_H */