10 CPUHP_AP_NOTIFY_STARTING,
14 CPUHP_SMPBOOT_THREADS,
17 CPUHP_ONLINE_DYN_END = CPUHP_ONLINE_DYN + 30,
21 int __cpuhp_setup_state(enum cpuhp_state state, const char *name, bool invoke,
22 int (*startup)(unsigned int cpu),
23 int (*teardown)(unsigned int cpu));
26 * cpuhp_setup_state - Setup hotplug state callbacks with calling the callbacks
27 * @state: The state for which the calls are installed
28 * @name: Name of the callback (will be used in debug output)
29 * @startup: startup callback function
30 * @teardown: teardown callback function
32 * Installs the callback functions and invokes the startup callback on
33 * the present cpus which have already reached the @state.
35 static inline int cpuhp_setup_state(enum cpuhp_state state,
37 int (*startup)(unsigned int cpu),
38 int (*teardown)(unsigned int cpu))
40 return __cpuhp_setup_state(state, name, true, startup, teardown);
44 * cpuhp_setup_state_nocalls - Setup hotplug state callbacks without calling the
46 * @state: The state for which the calls are installed
47 * @name: Name of the callback.
48 * @startup: startup callback function
49 * @teardown: teardown callback function
51 * Same as @cpuhp_setup_state except that no calls are executed are invoked
52 * during installation of this callback. NOP if SMP=n or HOTPLUG_CPU=n.
54 static inline int cpuhp_setup_state_nocalls(enum cpuhp_state state,
56 int (*startup)(unsigned int cpu),
57 int (*teardown)(unsigned int cpu))
59 return __cpuhp_setup_state(state, name, false, startup, teardown);
62 void __cpuhp_remove_state(enum cpuhp_state state, bool invoke);
65 * cpuhp_remove_state - Remove hotplug state callbacks and invoke the teardown
66 * @state: The state for which the calls are removed
68 * Removes the callback functions and invokes the teardown callback on
69 * the present cpus which have already reached the @state.
71 static inline void cpuhp_remove_state(enum cpuhp_state state)
73 __cpuhp_remove_state(state, true);
77 * cpuhp_remove_state_nocalls - Remove hotplug state callbacks without invoking
79 * @state: The state for which the calls are removed
81 static inline void cpuhp_remove_state_nocalls(enum cpuhp_state state)
83 __cpuhp_remove_state(state, false);