]>
git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blob - include/linux/cpuhotplug.h
11 CPUHP_AP_SCHED_STARTING
,
12 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,
24 int __cpuhp_setup_state(enum cpuhp_state state
, const char *name
, bool invoke
,
25 int (*startup
)(unsigned int cpu
),
26 int (*teardown
)(unsigned int cpu
));
29 * cpuhp_setup_state - Setup hotplug state callbacks with calling the callbacks
30 * @state: The state for which the calls are installed
31 * @name: Name of the callback (will be used in debug output)
32 * @startup: startup callback function
33 * @teardown: teardown callback function
35 * Installs the callback functions and invokes the startup callback on
36 * the present cpus which have already reached the @state.
38 static inline int cpuhp_setup_state(enum cpuhp_state state
,
40 int (*startup
)(unsigned int cpu
),
41 int (*teardown
)(unsigned int cpu
))
43 return __cpuhp_setup_state(state
, name
, true, startup
, teardown
);
47 * cpuhp_setup_state_nocalls - Setup hotplug state callbacks without calling the
49 * @state: The state for which the calls are installed
50 * @name: Name of the callback.
51 * @startup: startup callback function
52 * @teardown: teardown callback function
54 * Same as @cpuhp_setup_state except that no calls are executed are invoked
55 * during installation of this callback. NOP if SMP=n or HOTPLUG_CPU=n.
57 static inline int cpuhp_setup_state_nocalls(enum cpuhp_state state
,
59 int (*startup
)(unsigned int cpu
),
60 int (*teardown
)(unsigned int cpu
))
62 return __cpuhp_setup_state(state
, name
, false, startup
, teardown
);
65 void __cpuhp_remove_state(enum cpuhp_state state
, bool invoke
);
68 * cpuhp_remove_state - Remove hotplug state callbacks and invoke the teardown
69 * @state: The state for which the calls are removed
71 * Removes the callback functions and invokes the teardown callback on
72 * the present cpus which have already reached the @state.
74 static inline void cpuhp_remove_state(enum cpuhp_state state
)
76 __cpuhp_remove_state(state
, true);
80 * cpuhp_remove_state_nocalls - Remove hotplug state callbacks without invoking
82 * @state: The state for which the calls are removed
84 static inline void cpuhp_remove_state_nocalls(enum cpuhp_state state
)
86 __cpuhp_remove_state(state
, false);
90 void cpuhp_online_idle(enum cpuhp_state state
);
92 static inline void cpuhp_online_idle(enum cpuhp_state state
) { }