aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/rcutree.c11
-rw-r--r--kernel/rcutree_plugin.h4
2 files changed, 7 insertions, 8 deletions
diff --git a/kernel/rcutree.c b/kernel/rcutree.c
index ae4a553e37ce..1b32cdd1b2e2 100644
--- a/kernel/rcutree.c
+++ b/kernel/rcutree.c
@@ -601,8 +601,6 @@ rcu_start_gp(struct rcu_state *rsp, unsigned long flags)
601{ 601{
602 struct rcu_data *rdp = rsp->rda[smp_processor_id()]; 602 struct rcu_data *rdp = rsp->rda[smp_processor_id()];
603 struct rcu_node *rnp = rcu_get_root(rsp); 603 struct rcu_node *rnp = rcu_get_root(rsp);
604 struct rcu_node *rnp_cur;
605 struct rcu_node *rnp_end;
606 604
607 if (!cpu_needs_another_gp(rsp, rdp)) { 605 if (!cpu_needs_another_gp(rsp, rdp)) {
608 spin_unlock_irqrestore(&rnp->lock, flags); 606 spin_unlock_irqrestore(&rnp->lock, flags);
@@ -659,13 +657,12 @@ rcu_start_gp(struct rcu_state *rsp, unsigned long flags)
659 * one corresponding to this CPU, due to the fact that we have 657 * one corresponding to this CPU, due to the fact that we have
660 * irqs disabled. 658 * irqs disabled.
661 */ 659 */
662 rnp_end = &rsp->node[NUM_RCU_NODES]; 660 for (rnp = &rsp->node[0]; rnp < &rsp->node[NUM_RCU_NODES]; rnp++) {
663 for (rnp_cur = &rsp->node[0]; rnp_cur < rnp_end; rnp_cur++) { 661 spin_lock(&rnp->lock); /* irqs already disabled. */
664 spin_lock(&rnp_cur->lock); /* irqs already disabled. */
665 rcu_preempt_check_blocked_tasks(rnp); 662 rcu_preempt_check_blocked_tasks(rnp);
666 rnp_cur->qsmask = rnp_cur->qsmaskinit; 663 rnp->qsmask = rnp->qsmaskinit;
667 rnp->gpnum = rsp->gpnum; 664 rnp->gpnum = rsp->gpnum;
668 spin_unlock(&rnp_cur->lock); /* irqs already disabled. */ 665 spin_unlock(&rnp->lock); /* irqs already disabled. */
669 } 666 }
670 667
671 rsp->signaled = RCU_SIGNAL_INIT; /* force_quiescent_state now OK. */ 668 rsp->signaled = RCU_SIGNAL_INIT; /* force_quiescent_state now OK. */
diff --git a/kernel/rcutree_plugin.h b/kernel/rcutree_plugin.h
index cd6047cc7fc2..09b7325baad1 100644
--- a/kernel/rcutree_plugin.h
+++ b/kernel/rcutree_plugin.h
@@ -476,10 +476,12 @@ static void rcu_print_task_stall(struct rcu_node *rnp)
476 476
477/* 477/*
478 * Because there is no preemptable RCU, there can be no readers blocked, 478 * Because there is no preemptable RCU, there can be no readers blocked,
479 * so there is no need to check for blocked tasks. 479 * so there is no need to check for blocked tasks. So check only for
480 * bogus qsmask values.
480 */ 481 */
481static void rcu_preempt_check_blocked_tasks(struct rcu_node *rnp) 482static void rcu_preempt_check_blocked_tasks(struct rcu_node *rnp)
482{ 483{
484 WARN_ON_ONCE(rnp->qsmask);
483} 485}
484 486
485/* 487/*