xref: /OK3568_Linux_fs/kernel/include/linux/sched/hotplug.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _LINUX_SCHED_HOTPLUG_H
3 #define _LINUX_SCHED_HOTPLUG_H
4 
5 /*
6  * Scheduler interfaces for hotplug CPU support:
7  */
8 
9 extern int sched_cpu_starting(unsigned int cpu);
10 extern int sched_cpu_activate(unsigned int cpu);
11 extern int sched_cpus_activate(struct cpumask *cpus);
12 extern int sched_cpu_deactivate(unsigned int cpu);
13 extern int sched_cpus_deactivate_nosync(struct cpumask *cpus);
14 extern int sched_cpu_drain_rq(unsigned int cpu);
15 extern void sched_cpu_drain_rq_wait(unsigned int cpu);
16 
17 #ifdef CONFIG_HOTPLUG_CPU
18 extern int sched_cpu_dying(unsigned int cpu);
19 #else
20 # define sched_cpu_dying	NULL
21 #endif
22 
23 #ifdef CONFIG_HOTPLUG_CPU
24 extern void idle_task_exit(void);
25 #else
idle_task_exit(void)26 static inline void idle_task_exit(void) {}
27 #endif
28 
29 #endif /* _LINUX_SCHED_HOTPLUG_H */
30