summaryrefslogtreecommitdiff
path: root/kernel/rcupreempt.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-03-03 14:32:04 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2009-03-03 14:32:04 -0800
commitb24746c7be75384d182845375c96433d713981bb (patch)
treefdb0371d9e59c94e18c946a88c4aa3bcfa4af9b1 /kernel/rcupreempt.c
parentf41bf2ab998daaa2ac27348d5813e0ae21c57ded (diff)
parenta682604838763981613e42015cd0e39f2989d6bb (diff)
Merge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: rcu: Teach RCU that idle task is not quiscent state at boot
Diffstat (limited to 'kernel/rcupreempt.c')
-rw-r--r--kernel/rcupreempt.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/rcupreempt.c b/kernel/rcupreempt.c
index 33cfc50781f9..5d59e850fb71 100644
--- a/kernel/rcupreempt.c
+++ b/kernel/rcupreempt.c
@@ -1181,6 +1181,9 @@ void __synchronize_sched(void)
{
struct rcu_synchronize rcu;
+ if (num_online_cpus() == 1)
+ return; /* blocking is gp if only one CPU! */
+
init_completion(&rcu.completion);
/* Will wake me after RCU finished. */
call_rcu_sched(&rcu.head, wakeme_after_rcu);