rcu: Simplify RCU CPU-hotplug notification
[deliverable/linux.git] / kernel / rcupreempt.c
index beb0e659adcc60be60bcc1efd2c6e9ca45367afe..9b87f5134ed71dd88d0eecf313f05ccb9076c808 100644 (file)
@@ -1417,8 +1417,8 @@ int rcu_pending(int cpu)
        return 0;
 }
 
-static int __cpuinit rcu_cpu_notify(struct notifier_block *self,
-                               unsigned long action, void *hcpu)
+int __cpuinit rcu_cpu_notify(struct notifier_block *self,
+                            unsigned long action, void *hcpu)
 {
        long cpu = (long)hcpu;
 
@@ -1439,10 +1439,6 @@ static int __cpuinit rcu_cpu_notify(struct notifier_block *self,
        return NOTIFY_OK;
 }
 
-static struct notifier_block __cpuinitdata rcu_nb = {
-       .notifier_call = rcu_cpu_notify,
-};
-
 void __init __rcu_init(void)
 {
        int cpu;
@@ -1471,23 +1467,6 @@ void __init __rcu_init(void)
                rdp->waitschedtail = &rdp->waitschedlist;
                rdp->rcu_sched_sleeping = 0;
        }
-       register_cpu_notifier(&rcu_nb);
-
-       /*
-        * We don't need protection against CPU-Hotplug here
-        * since
-        * a) If a CPU comes online while we are iterating over the
-        *    cpu_online_mask below, we would only end up making a
-        *    duplicate call to rcu_online_cpu() which sets the corresponding
-        *    CPU's mask in the rcu_cpu_online_map.
-        *
-        * b) A CPU cannot go offline at this point in time since the user
-        *    does not have access to the sysfs interface, nor do we
-        *    suspend the system.
-        */
-       for_each_online_cpu(cpu)
-               rcu_cpu_notify(&rcu_nb, CPU_UP_PREPARE, (void *)(long) cpu);
-
        open_softirq(RCU_SOFTIRQ, rcu_process_callbacks);
 }
 
This page took 0.024909 seconds and 5 git commands to generate.