10 CPUHP_AP_NOTIFY_STARTING,
16 CPUHP_AP_SMPBOOT_THREADS,
17 CPUHP_AP_NOTIFY_ONLINE,
19 CPUHP_AP_ONLINE_DYN_END = CPUHP_AP_ONLINE_DYN + 30,
23 int __cpuhp_setup_state(enum cpuhp_state state, const char *name, bool invoke,
24 int (*startup)(unsigned int cpu),
25 int (*teardown)(unsigned int cpu));
28 * cpuhp_setup_state - Setup hotplug state callbacks with calling the callbacks
29 * @state: The state for which the calls are installed
30 * @name: Name of the callback (will be used in debug output)
31 * @startup: startup callback function
32 * @teardown: teardown callback function
34 * Installs the callback functions and invokes the startup callback on
35 * the present cpus which have already reached the @state.
37 static inline int cpuhp_setup_state(enum cpuhp_state state,
39 int (*startup)(unsigned int cpu),
40 int (*teardown)(unsigned int cpu))
42 return __cpuhp_setup_state(state, name, true, startup, teardown);
46 * cpuhp_setup_state_nocalls - Setup hotplug state callbacks without calling the
48 * @state: The state for which the calls are installed
49 * @name: Name of the callback.
50 * @startup: startup callback function
51 * @teardown: teardown callback function
53 * Same as @cpuhp_setup_state except that no calls are executed are invoked
54 * during installation of this callback. NOP if SMP=n or HOTPLUG_CPU=n.
56 static inline int cpuhp_setup_state_nocalls(enum cpuhp_state state,
58 int (*startup)(unsigned int cpu),
59 int (*teardown)(unsigned int cpu))
61 return __cpuhp_setup_state(state, name, false, startup, teardown);
64 void __cpuhp_remove_state(enum cpuhp_state state, bool invoke);
67 * cpuhp_remove_state - Remove hotplug state callbacks and invoke the teardown
68 * @state: The state for which the calls are removed
70 * Removes the callback functions and invokes the teardown callback on
71 * the present cpus which have already reached the @state.
73 static inline void cpuhp_remove_state(enum cpuhp_state state)
75 __cpuhp_remove_state(state, true);
79 * cpuhp_remove_state_nocalls - Remove hotplug state callbacks without invoking
81 * @state: The state for which the calls are removed
83 static inline void cpuhp_remove_state_nocalls(enum cpuhp_state state)
85 __cpuhp_remove_state(state, false);