diff options
author | Xinyu Chen <b03824@freescale.com> | 2011-10-11 16:26:02 +0800 |
---|---|---|
committer | Xinyu Chen <b03824@freescale.com> | 2011-10-11 16:26:02 +0800 |
commit | 5b2d450d495ecfda84d817ee92407340e8455e4d (patch) | |
tree | 066dc1e926f58755782cdfad3e0f6d1995a97ef4 /kernel | |
parent | 949ce411ed8db6ca2146e1bbb35f23f095ddb010 (diff) | |
parent | 1def97410f512f43681660f5a9eeb5662c453380 (diff) |
Merge remote branch 'fsl-linux-sdk/imx_2.6.38' into imx_2.6.38_android
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/rcutree.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/kernel/rcutree.c b/kernel/rcutree.c index dd4aea806f8e..a28f893615fa 100644 --- a/kernel/rcutree.c +++ b/kernel/rcutree.c @@ -47,6 +47,7 @@ #include <linux/mutex.h> #include <linux/time.h> #include <linux/kernel_stat.h> +#include <linux/tick.h> #include "rcutree.h" @@ -1413,6 +1414,7 @@ static void rcu_process_callbacks(struct softirq_action *unused) /* If we are last CPU on way to dyntick-idle mode, accelerate it. */ rcu_needs_cpu_flush(); } +static atomic_t rcu_barrier_cpu_count; static void __call_rcu(struct rcu_head *head, void (*func)(struct rcu_head *rcu), @@ -1440,6 +1442,14 @@ __call_rcu(struct rcu_head *head, void (*func)(struct rcu_head *rcu), *rdp->nxttail[RCU_NEXT_TAIL] = head; rdp->nxttail[RCU_NEXT_TAIL] = &head->next; + /* Work around for reboot issue, check rcu_barrier_cpu_count + to see whether it is in the _rcu_barrier process, do + tick_nohz_restart_sched_tick if yes. If we enqueue an rcu + callback, we need the CPU tick to stay alive until we take care + of those by completing the appropriate grace period. */ + if (atomic_read(&rcu_barrier_cpu_count) != 0) + tick_nohz_restart_sched_tick(); + /* * Force the grace period if too many callbacks or too long waiting. * Enforce hysteresis, and don't invoke force_quiescent_state() @@ -1654,7 +1664,6 @@ static int rcu_needs_cpu_quick_check(int cpu) } static DEFINE_PER_CPU(struct rcu_head, rcu_barrier_head) = {NULL}; -static atomic_t rcu_barrier_cpu_count; static DEFINE_MUTEX(rcu_barrier_mutex); static struct completion rcu_barrier_completion; |