aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/cpu.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/cpu.h')
-rw-r--r--include/linux/cpu.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/linux/cpu.h b/include/linux/cpu.h
index 4260e8594bd7..c0fb6b1b4712 100644
--- a/include/linux/cpu.h
+++ b/include/linux/cpu.h
@@ -73,6 +73,7 @@ enum {
73 /* migration should happen before other stuff but after perf */ 73 /* migration should happen before other stuff but after perf */
74 CPU_PRI_PERF = 20, 74 CPU_PRI_PERF = 20,
75 CPU_PRI_MIGRATION = 10, 75 CPU_PRI_MIGRATION = 10,
76 CPU_PRI_SMPBOOT = 9,
76 /* bring up workqueues before normal notifiers and down after */ 77 /* bring up workqueues before normal notifiers and down after */
77 CPU_PRI_WORKQUEUE_UP = 5, 78 CPU_PRI_WORKQUEUE_UP = 5,
78 CPU_PRI_WORKQUEUE_DOWN = -5, 79 CPU_PRI_WORKQUEUE_DOWN = -5,
@@ -95,6 +96,10 @@ enum {
95 * Called on the new cpu, just before 96 * Called on the new cpu, just before
96 * enabling interrupts. Must not sleep, 97 * enabling interrupts. Must not sleep,
97 * must not fail */ 98 * must not fail */
99#define CPU_DYING_IDLE 0x000B /* CPU (unsigned)v dying, reached
100 * idle loop. */
101#define CPU_BROKEN 0x000C /* CPU (unsigned)v did not die properly,
102 * perhaps due to preemption. */
98 103
99/* Used for CPU hotplug events occurring while tasks are frozen due to a suspend 104/* Used for CPU hotplug events occurring while tasks are frozen due to a suspend
100 * operation in progress 105 * operation in progress
@@ -161,6 +166,7 @@ static inline void __unregister_cpu_notifier(struct notifier_block *nb)
161} 166}
162#endif 167#endif
163 168
169void smpboot_thread_init(void);
164int cpu_up(unsigned int cpu); 170int cpu_up(unsigned int cpu);
165void notify_cpu_starting(unsigned int cpu); 171void notify_cpu_starting(unsigned int cpu);
166extern void cpu_maps_update_begin(void); 172extern void cpu_maps_update_begin(void);
@@ -208,6 +214,10 @@ static inline void cpu_notifier_register_done(void)
208{ 214{
209} 215}
210 216
217static inline void smpboot_thread_init(void)
218{
219}
220
211#endif /* CONFIG_SMP */ 221#endif /* CONFIG_SMP */
212extern struct bus_type cpu_subsys; 222extern struct bus_type cpu_subsys;
213 223
@@ -271,4 +281,14 @@ void arch_cpu_idle_enter(void);
271void arch_cpu_idle_exit(void); 281void arch_cpu_idle_exit(void);
272void arch_cpu_idle_dead(void); 282void arch_cpu_idle_dead(void);
273 283
284DECLARE_PER_CPU(bool, cpu_dead_idle);
285
286int cpu_report_state(int cpu);
287int cpu_check_up_prepare(int cpu);
288void cpu_set_state_online(int cpu);
289#ifdef CONFIG_HOTPLUG_CPU
290bool cpu_wait_death(unsigned int cpu, int seconds);
291bool cpu_report_death(void);
292#endif /* #ifdef CONFIG_HOTPLUG_CPU */
293
274#endif /* _LINUX_CPU_H_ */ 294#endif /* _LINUX_CPU_H_ */