diff options
Diffstat (limited to 'kernel/rcupdate.c')
-rw-r--r-- | kernel/rcupdate.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/kernel/rcupdate.c b/kernel/rcupdate.c index eae29c25fb14..8df115600c2d 100644 --- a/kernel/rcupdate.c +++ b/kernel/rcupdate.c | |||
@@ -217,9 +217,13 @@ static void rcu_migrate_callback(struct rcu_head *notused) | |||
217 | wake_up(&rcu_migrate_wq); | 217 | wake_up(&rcu_migrate_wq); |
218 | } | 218 | } |
219 | 219 | ||
220 | extern int rcu_cpu_notify(struct notifier_block *self, | ||
221 | unsigned long action, void *hcpu); | ||
222 | |||
220 | static int __cpuinit rcu_barrier_cpu_hotplug(struct notifier_block *self, | 223 | static int __cpuinit rcu_barrier_cpu_hotplug(struct notifier_block *self, |
221 | unsigned long action, void *hcpu) | 224 | unsigned long action, void *hcpu) |
222 | { | 225 | { |
226 | rcu_cpu_notify(self, action, hcpu); | ||
223 | if (action == CPU_DYING) { | 227 | if (action == CPU_DYING) { |
224 | /* | 228 | /* |
225 | * preempt_disable() in on_each_cpu() prevents stop_machine(), | 229 | * preempt_disable() in on_each_cpu() prevents stop_machine(), |
@@ -244,8 +248,18 @@ static int __cpuinit rcu_barrier_cpu_hotplug(struct notifier_block *self, | |||
244 | 248 | ||
245 | void __init rcu_init(void) | 249 | void __init rcu_init(void) |
246 | { | 250 | { |
251 | int i; | ||
252 | |||
247 | __rcu_init(); | 253 | __rcu_init(); |
248 | hotcpu_notifier(rcu_barrier_cpu_hotplug, 0); | 254 | cpu_notifier(rcu_barrier_cpu_hotplug, 0); |
255 | |||
256 | /* | ||
257 | * We don't need protection against CPU-hotplug here because | ||
258 | * this is called early in boot, before either interrupts | ||
259 | * or the scheduler are operational. | ||
260 | */ | ||
261 | for_each_online_cpu(i) | ||
262 | rcu_barrier_cpu_hotplug(NULL, CPU_UP_PREPARE, (void *)(long)i); | ||
249 | } | 263 | } |
250 | 264 | ||
251 | void rcu_scheduler_starting(void) | 265 | void rcu_scheduler_starting(void) |