diff options
Diffstat (limited to 'include/linux/cpu.h')
-rw-r--r-- | include/linux/cpu.h | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/include/linux/cpu.h b/include/linux/cpu.h index 92f2029a34f3..0be8d65bc3c8 100644 --- a/include/linux/cpu.h +++ b/include/linux/cpu.h | |||
@@ -71,18 +71,27 @@ static inline void unregister_cpu_notifier(struct notifier_block *nb) | |||
71 | 71 | ||
72 | int cpu_up(unsigned int cpu); | 72 | int cpu_up(unsigned int cpu); |
73 | 73 | ||
74 | extern void cpu_hotplug_init(void); | ||
75 | |||
74 | #else | 76 | #else |
75 | 77 | ||
76 | static inline int register_cpu_notifier(struct notifier_block *nb) | 78 | static inline int register_cpu_notifier(struct notifier_block *nb) |
77 | { | 79 | { |
78 | return 0; | 80 | return 0; |
79 | } | 81 | } |
82 | |||
80 | static inline void unregister_cpu_notifier(struct notifier_block *nb) | 83 | static inline void unregister_cpu_notifier(struct notifier_block *nb) |
81 | { | 84 | { |
82 | } | 85 | } |
83 | 86 | ||
87 | static inline void cpu_hotplug_init(void) | ||
88 | { | ||
89 | } | ||
90 | |||
84 | #endif /* CONFIG_SMP */ | 91 | #endif /* CONFIG_SMP */ |
85 | extern struct sysdev_class cpu_sysdev_class; | 92 | extern struct sysdev_class cpu_sysdev_class; |
93 | extern void cpu_maps_update_begin(void); | ||
94 | extern void cpu_maps_update_done(void); | ||
86 | 95 | ||
87 | #ifdef CONFIG_HOTPLUG_CPU | 96 | #ifdef CONFIG_HOTPLUG_CPU |
88 | /* Stop CPUs going up and down. */ | 97 | /* Stop CPUs going up and down. */ |
@@ -97,8 +106,8 @@ static inline void cpuhotplug_mutex_unlock(struct mutex *cpu_hp_mutex) | |||
97 | mutex_unlock(cpu_hp_mutex); | 106 | mutex_unlock(cpu_hp_mutex); |
98 | } | 107 | } |
99 | 108 | ||
100 | extern void lock_cpu_hotplug(void); | 109 | extern void get_online_cpus(void); |
101 | extern void unlock_cpu_hotplug(void); | 110 | extern void put_online_cpus(void); |
102 | #define hotcpu_notifier(fn, pri) { \ | 111 | #define hotcpu_notifier(fn, pri) { \ |
103 | static struct notifier_block fn##_nb = \ | 112 | static struct notifier_block fn##_nb = \ |
104 | { .notifier_call = fn, .priority = pri }; \ | 113 | { .notifier_call = fn, .priority = pri }; \ |
@@ -115,8 +124,8 @@ static inline void cpuhotplug_mutex_lock(struct mutex *cpu_hp_mutex) | |||
115 | static inline void cpuhotplug_mutex_unlock(struct mutex *cpu_hp_mutex) | 124 | static inline void cpuhotplug_mutex_unlock(struct mutex *cpu_hp_mutex) |
116 | { } | 125 | { } |
117 | 126 | ||
118 | #define lock_cpu_hotplug() do { } while (0) | 127 | #define get_online_cpus() do { } while (0) |
119 | #define unlock_cpu_hotplug() do { } while (0) | 128 | #define put_online_cpus() do { } while (0) |
120 | #define hotcpu_notifier(fn, pri) do { (void)(fn); } while (0) | 129 | #define hotcpu_notifier(fn, pri) do { (void)(fn); } while (0) |
121 | /* These aren't inline functions due to a GCC bug. */ | 130 | /* These aren't inline functions due to a GCC bug. */ |
122 | #define register_hotcpu_notifier(nb) ({ (void)(nb); 0; }) | 131 | #define register_hotcpu_notifier(nb) ({ (void)(nb); 0; }) |