blob: 34dd3d7ba40bc0a5e3a11d7cf5cea4a641f030ad [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Thomas Gleixner38498a62012-04-20 13:05:44 +00002#ifndef SMPBOOT_H
3#define SMPBOOT_H
4
Thomas Gleixner29d5e042012-04-20 13:05:45 +00005struct task_struct;
6
Thomas Gleixner29d5e042012-04-20 13:05:45 +00007#ifdef CONFIG_GENERIC_SMP_IDLE_THREAD
8struct task_struct *idle_thread_get(unsigned int cpu);
9void idle_thread_set_boot_cpu(void);
Suresh Siddha3bb5d2e2012-04-20 17:08:50 -070010void idle_threads_init(void);
Thomas Gleixner29d5e042012-04-20 13:05:45 +000011#else
12static inline struct task_struct *idle_thread_get(unsigned int cpu) { return NULL; }
13static inline void idle_thread_set_boot_cpu(void) { }
Thomas Gleixner43a18b12012-05-04 12:52:25 +020014static inline void idle_threads_init(void) { }
Thomas Gleixner29d5e042012-04-20 13:05:45 +000015#endif
16
Thomas Gleixnerf97f8f02012-07-16 10:42:36 +000017int smpboot_create_threads(unsigned int cpu);
Thomas Gleixner931ef162016-02-26 18:43:36 +000018int smpboot_park_threads(unsigned int cpu);
19int smpboot_unpark_threads(unsigned int cpu);
Thomas Gleixnerf97f8f02012-07-16 10:42:36 +000020
Thomas Gleixner4cb28ce2016-02-26 18:43:38 +000021void __init cpuhp_threads_init(void);
22
Thomas Gleixner38498a62012-04-20 13:05:44 +000023#endif