From: Ingo Molnar Date: Fri, 11 Jul 2008 08:46:50 +0000 (+0200) Subject: Merge branch 'linus' into core/rcu X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0c81b2a1448bc6a2a9b2d6469fb0669fb4b25e5b;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git Merge branch 'linus' into core/rcu Conflicts: include/linux/rculist.h kernel/rcupreempt.c Signed-off-by: Ingo Molnar --- 0c81b2a1448bc6a2a9b2d6469fb0669fb4b25e5b diff --cc kernel/rcupreempt.c index 396b121edfe5,41d275a81df5..536ce83c55fe --- a/kernel/rcupreempt.c +++ b/kernel/rcupreempt.c @@@ -1056,42 -925,23 +1056,38 @@@ void rcu_offline_cpu(int cpu spin_unlock_irqrestore(&rdp->lock, flags); } - void __devinit rcu_online_cpu(int cpu) + #else /* #ifdef CONFIG_HOTPLUG_CPU */ + + void rcu_offline_cpu(int cpu) + { + } + + #endif /* #else #ifdef CONFIG_HOTPLUG_CPU */ + + void __cpuinit rcu_online_cpu(int cpu) { unsigned long flags; + struct rcu_data *rdp; spin_lock_irqsave(&rcu_ctrlblk.fliplock, flags); cpu_set(cpu, rcu_cpu_online_map); spin_unlock_irqrestore(&rcu_ctrlblk.fliplock, flags); + + /* + * The rcu_sched grace-period processing might have bypassed + * this CPU, given that it was not in the rcu_cpu_online_map + * when the grace-period scan started. This means that the + * grace-period task might sleep. So make sure that if this + * should happen, the first callback posted to this CPU will + * wake up the grace-period task if need be. + */ + + rdp = RCU_DATA_CPU(cpu); + spin_lock_irqsave(&rdp->lock, flags); + rdp->rcu_sched_sleeping = 1; + spin_unlock_irqrestore(&rdp->lock, flags); } - #else /* #ifdef CONFIG_HOTPLUG_CPU */ - - void rcu_offline_cpu(int cpu) - { - } - - void __devinit rcu_online_cpu(int cpu) - { - } - - #endif /* #else #ifdef CONFIG_HOTPLUG_CPU */ - static void rcu_process_callbacks(struct softirq_action *unused) { unsigned long flags;