11 CPUHP_AP_NOTIFY_STARTING,
15 CPUHP_AP_SMPBOOT_THREADS,
16 CPUHP_AP_NOTIFY_ONLINE,
18 CPUHP_AP_ONLINE_DYN_END = CPUHP_AP_ONLINE_DYN + 30,
22 int __cpuhp_setup_state(enum cpuhp_state state, const char *name, bool invoke,
23 int (*startup)(unsigned int cpu),
24 int (*teardown)(unsigned int cpu));
27 * cpuhp_setup_state - Setup hotplug state callbacks with calling the callbacks
28 * @state: The state for which the calls are installed
29 * @name: Name of the callback (will be used in debug output)
30 * @startup: startup callback function
31 * @teardown: teardown callback function
33 * Installs the callback functions and invokes the startup callback on
34 * the present cpus which have already reached the @state.
36 static inline int cpuhp_setup_state(enum cpuhp_state state,
38 int (*startup)(unsigned int cpu),
39 int (*teardown)(unsigned int cpu))
41 return __cpuhp_setup_state(state, name, true, startup, teardown);
45 * cpuhp_setup_state_nocalls - Setup hotplug state callbacks without calling the
47 * @state: The state for which the calls are installed
48 * @name: Name of the callback.
49 * @startup: startup callback function
50 * @teardown: teardown callback function
52 * Same as @cpuhp_setup_state except that no calls are executed are invoked
53 * during installation of this callback. NOP if SMP=n or HOTPLUG_CPU=n.
55 static inline int cpuhp_setup_state_nocalls(enum cpuhp_state state,
57 int (*startup)(unsigned int cpu),
58 int (*teardown)(unsigned int cpu))
60 return __cpuhp_setup_state(state, name, false, startup, teardown);
63 void __cpuhp_remove_state(enum cpuhp_state state, bool invoke);
66 * cpuhp_remove_state - Remove hotplug state callbacks and invoke the teardown
67 * @state: The state for which the calls are removed
69 * Removes the callback functions and invokes the teardown callback on
70 * the present cpus which have already reached the @state.
72 static inline void cpuhp_remove_state(enum cpuhp_state state)
74 __cpuhp_remove_state(state, true);
78 * cpuhp_remove_state_nocalls - Remove hotplug state callbacks without invoking
80 * @state: The state for which the calls are removed
82 static inline void cpuhp_remove_state_nocalls(enum cpuhp_state state)
84 __cpuhp_remove_state(state, false);
88 void cpuhp_online_idle(enum cpuhp_state state);
90 static inline void cpuhp_online_idle(enum cpuhp_state state) { }