#include <linux/cpu.h>
#include <linux/err.h>
#include <linux/smp.h>
#include <linux/delay.h>
#include <linux/init.h>
#include <linux/list.h>
#include <linux/slab.h>
#include <linux/sched.h>
#include <linux/sched/task.h>
#include <linux/export.h>
#include <linux/percpu.h>
#include <linux/kthread.h>
#include <linux/smpboot.h>
#include "smpboot.h"
#ifdef CONFIG_SMP
#ifdef CONFIG_GENERIC_SMP_IDLE_THREAD
static DEFINE_PER_CPU(struct task_struct *, idle_threads);
struct task_struct *idle_thread_get(unsigned int cpu)
{ … }
void __init idle_thread_set_boot_cpu(void)
{ … }
static __always_inline void idle_init(unsigned int cpu)
{ … }
void __init idle_threads_init(void)
{ … }
#endif
#endif
static LIST_HEAD(hotplug_threads);
static DEFINE_MUTEX(smpboot_threads_lock);
struct smpboot_thread_data { … };
enum { … };
static int smpboot_thread_fn(void *data)
{ … }
static int
__smpboot_create_thread(struct smp_hotplug_thread *ht, unsigned int cpu)
{ … }
int smpboot_create_threads(unsigned int cpu)
{ … }
static void smpboot_unpark_thread(struct smp_hotplug_thread *ht, unsigned int cpu)
{ … }
int smpboot_unpark_threads(unsigned int cpu)
{ … }
static void smpboot_park_thread(struct smp_hotplug_thread *ht, unsigned int cpu)
{ … }
int smpboot_park_threads(unsigned int cpu)
{ … }
static void smpboot_destroy_threads(struct smp_hotplug_thread *ht)
{ … }
int smpboot_register_percpu_thread(struct smp_hotplug_thread *plug_thread)
{ … }
EXPORT_SYMBOL_GPL(…);
void smpboot_unregister_percpu_thread(struct smp_hotplug_thread *plug_thread)
{ … }
EXPORT_SYMBOL_GPL(…);