diff options
Diffstat (limited to 'kernel/rcupreempt.c')
-rw-r--r-- | kernel/rcupreempt.c | 25 |
1 files changed, 2 insertions, 23 deletions
diff --git a/kernel/rcupreempt.c b/kernel/rcupreempt.c index beb0e659adcc..9b87f5134ed7 100644 --- a/kernel/rcupreempt.c +++ b/kernel/rcupreempt.c | |||
@@ -1417,8 +1417,8 @@ int rcu_pending(int cpu) | |||
1417 | return 0; | 1417 | return 0; |
1418 | } | 1418 | } |
1419 | 1419 | ||
1420 | static int __cpuinit rcu_cpu_notify(struct notifier_block *self, | 1420 | int __cpuinit rcu_cpu_notify(struct notifier_block *self, |
1421 | unsigned long action, void *hcpu) | 1421 | unsigned long action, void *hcpu) |
1422 | { | 1422 | { |
1423 | long cpu = (long)hcpu; | 1423 | long cpu = (long)hcpu; |
1424 | 1424 | ||
@@ -1439,10 +1439,6 @@ static int __cpuinit rcu_cpu_notify(struct notifier_block *self, | |||
1439 | return NOTIFY_OK; | 1439 | return NOTIFY_OK; |
1440 | } | 1440 | } |
1441 | 1441 | ||
1442 | static struct notifier_block __cpuinitdata rcu_nb = { | ||
1443 | .notifier_call = rcu_cpu_notify, | ||
1444 | }; | ||
1445 | |||
1446 | void __init __rcu_init(void) | 1442 | void __init __rcu_init(void) |
1447 | { | 1443 | { |
1448 | int cpu; | 1444 | int cpu; |
@@ -1471,23 +1467,6 @@ void __init __rcu_init(void) | |||
1471 | rdp->waitschedtail = &rdp->waitschedlist; | 1467 | rdp->waitschedtail = &rdp->waitschedlist; |
1472 | rdp->rcu_sched_sleeping = 0; | 1468 | rdp->rcu_sched_sleeping = 0; |
1473 | } | 1469 | } |
1474 | register_cpu_notifier(&rcu_nb); | ||
1475 | |||
1476 | /* | ||
1477 | * We don't need protection against CPU-Hotplug here | ||
1478 | * since | ||
1479 | * a) If a CPU comes online while we are iterating over the | ||
1480 | * cpu_online_mask below, we would only end up making a | ||
1481 | * duplicate call to rcu_online_cpu() which sets the corresponding | ||
1482 | * CPU's mask in the rcu_cpu_online_map. | ||
1483 | * | ||
1484 | * b) A CPU cannot go offline at this point in time since the user | ||
1485 | * does not have access to the sysfs interface, nor do we | ||
1486 | * suspend the system. | ||
1487 | */ | ||
1488 | for_each_online_cpu(cpu) | ||
1489 | rcu_cpu_notify(&rcu_nb, CPU_UP_PREPARE, (void *)(long) cpu); | ||
1490 | |||
1491 | open_softirq(RCU_SOFTIRQ, rcu_process_callbacks); | 1470 | open_softirq(RCU_SOFTIRQ, rcu_process_callbacks); |
1492 | } | 1471 | } |
1493 | 1472 | ||