11 CPUHP_AP_SCHED_STARTING,
12 CPUHP_AP_IRQ_GIC_STARTING,
13 CPUHP_AP_NOTIFY_STARTING,
17 CPUHP_AP_SMPBOOT_THREADS,
18 CPUHP_AP_X86_VDSO_VMA_ONLINE,
19 CPUHP_AP_NOTIFY_ONLINE,
21 CPUHP_AP_ONLINE_DYN_END = CPUHP_AP_ONLINE_DYN + 30,
26 int __cpuhp_setup_state(enum cpuhp_state state, const char *name, bool invoke,
27 int (*startup)(unsigned int cpu),
28 int (*teardown)(unsigned int cpu));
31 * cpuhp_setup_state - Setup hotplug state callbacks with calling the callbacks
32 * @state: The state for which the calls are installed
33 * @name: Name of the callback (will be used in debug output)
34 * @startup: startup callback function
35 * @teardown: teardown callback function
37 * Installs the callback functions and invokes the startup callback on
38 * the present cpus which have already reached the @state.
40 static inline int cpuhp_setup_state(enum cpuhp_state state,
42 int (*startup)(unsigned int cpu),
43 int (*teardown)(unsigned int cpu))
45 return __cpuhp_setup_state(state, name, true, startup, teardown);
49 * cpuhp_setup_state_nocalls - Setup hotplug state callbacks without calling the
51 * @state: The state for which the calls are installed
52 * @name: Name of the callback.
53 * @startup: startup callback function
54 * @teardown: teardown callback function
56 * Same as @cpuhp_setup_state except that no calls are executed are invoked
57 * during installation of this callback. NOP if SMP=n or HOTPLUG_CPU=n.
59 static inline int cpuhp_setup_state_nocalls(enum cpuhp_state state,
61 int (*startup)(unsigned int cpu),
62 int (*teardown)(unsigned int cpu))
64 return __cpuhp_setup_state(state, name, false, startup, teardown);
67 void __cpuhp_remove_state(enum cpuhp_state state, bool invoke);
70 * cpuhp_remove_state - Remove hotplug state callbacks and invoke the teardown
71 * @state: The state for which the calls are removed
73 * Removes the callback functions and invokes the teardown callback on
74 * the present cpus which have already reached the @state.
76 static inline void cpuhp_remove_state(enum cpuhp_state state)
78 __cpuhp_remove_state(state, true);
82 * cpuhp_remove_state_nocalls - Remove hotplug state callbacks without invoking
84 * @state: The state for which the calls are removed
86 static inline void cpuhp_remove_state_nocalls(enum cpuhp_state state)
88 __cpuhp_remove_state(state, false);
92 void cpuhp_online_idle(enum cpuhp_state state);
94 static inline void cpuhp_online_idle(enum cpuhp_state state) { }