|
@@ -146,8 +146,8 @@ static void __init rcu_bootup_announce(void)
|
|
|
* the corresponding expedited grace period will also be the end of the
|
|
* the corresponding expedited grace period will also be the end of the
|
|
|
* normal grace period.
|
|
* normal grace period.
|
|
|
*/
|
|
*/
|
|
|
-static void rcu_preempt_ctxt_queue(struct rcu_node *rnp, struct rcu_data *rdp,
|
|
|
|
|
- unsigned long flags) __releases(rnp->lock)
|
|
|
|
|
|
|
+static void rcu_preempt_ctxt_queue(struct rcu_node *rnp, struct rcu_data *rdp)
|
|
|
|
|
+ __releases(rnp->lock) /* But leaves rrupts disabled. */
|
|
|
{
|
|
{
|
|
|
int blkd_state = (rnp->gp_tasks ? RCU_GP_TASKS : 0) +
|
|
int blkd_state = (rnp->gp_tasks ? RCU_GP_TASKS : 0) +
|
|
|
(rnp->exp_tasks ? RCU_EXP_TASKS : 0) +
|
|
(rnp->exp_tasks ? RCU_EXP_TASKS : 0) +
|
|
@@ -235,7 +235,7 @@ static void rcu_preempt_ctxt_queue(struct rcu_node *rnp, struct rcu_data *rdp,
|
|
|
rnp->gp_tasks = &t->rcu_node_entry;
|
|
rnp->gp_tasks = &t->rcu_node_entry;
|
|
|
if (!rnp->exp_tasks && (blkd_state & RCU_EXP_BLKD))
|
|
if (!rnp->exp_tasks && (blkd_state & RCU_EXP_BLKD))
|
|
|
rnp->exp_tasks = &t->rcu_node_entry;
|
|
rnp->exp_tasks = &t->rcu_node_entry;
|
|
|
- raw_spin_unlock(&rnp->lock);
|
|
|
|
|
|
|
+ raw_spin_unlock(&rnp->lock); /* rrupts remain disabled. */
|
|
|
|
|
|
|
|
/*
|
|
/*
|
|
|
* Report the quiescent state for the expedited GP. This expedited
|
|
* Report the quiescent state for the expedited GP. This expedited
|
|
@@ -250,7 +250,6 @@ static void rcu_preempt_ctxt_queue(struct rcu_node *rnp, struct rcu_data *rdp,
|
|
|
} else {
|
|
} else {
|
|
|
WARN_ON_ONCE(t->rcu_read_unlock_special.b.exp_need_qs);
|
|
WARN_ON_ONCE(t->rcu_read_unlock_special.b.exp_need_qs);
|
|
|
}
|
|
}
|
|
|
- local_irq_restore(flags);
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
/*
|
|
@@ -285,12 +284,11 @@ static void rcu_preempt_qs(void)
|
|
|
* predating the current grace period drain, in other words, until
|
|
* predating the current grace period drain, in other words, until
|
|
|
* rnp->gp_tasks becomes NULL.
|
|
* rnp->gp_tasks becomes NULL.
|
|
|
*
|
|
*
|
|
|
- * Caller must disable preemption.
|
|
|
|
|
|
|
+ * Caller must disable interrupts.
|
|
|
*/
|
|
*/
|
|
|
static void rcu_preempt_note_context_switch(void)
|
|
static void rcu_preempt_note_context_switch(void)
|
|
|
{
|
|
{
|
|
|
struct task_struct *t = current;
|
|
struct task_struct *t = current;
|
|
|
- unsigned long flags;
|
|
|
|
|
struct rcu_data *rdp;
|
|
struct rcu_data *rdp;
|
|
|
struct rcu_node *rnp;
|
|
struct rcu_node *rnp;
|
|
|
|
|
|
|
@@ -300,7 +298,7 @@ static void rcu_preempt_note_context_switch(void)
|
|
|
/* Possibly blocking in an RCU read-side critical section. */
|
|
/* Possibly blocking in an RCU read-side critical section. */
|
|
|
rdp = this_cpu_ptr(rcu_state_p->rda);
|
|
rdp = this_cpu_ptr(rcu_state_p->rda);
|
|
|
rnp = rdp->mynode;
|
|
rnp = rdp->mynode;
|
|
|
- raw_spin_lock_irqsave_rcu_node(rnp, flags);
|
|
|
|
|
|
|
+ raw_spin_lock_rcu_node(rnp);
|
|
|
t->rcu_read_unlock_special.b.blocked = true;
|
|
t->rcu_read_unlock_special.b.blocked = true;
|
|
|
t->rcu_blocked_node = rnp;
|
|
t->rcu_blocked_node = rnp;
|
|
|
|
|
|
|
@@ -316,7 +314,7 @@ static void rcu_preempt_note_context_switch(void)
|
|
|
(rnp->qsmask & rdp->grpmask)
|
|
(rnp->qsmask & rdp->grpmask)
|
|
|
? rnp->gpnum
|
|
? rnp->gpnum
|
|
|
: rnp->gpnum + 1);
|
|
: rnp->gpnum + 1);
|
|
|
- rcu_preempt_ctxt_queue(rnp, rdp, flags);
|
|
|
|
|
|
|
+ rcu_preempt_ctxt_queue(rnp, rdp);
|
|
|
} else if (t->rcu_read_lock_nesting < 0 &&
|
|
} else if (t->rcu_read_lock_nesting < 0 &&
|
|
|
t->rcu_read_unlock_special.s) {
|
|
t->rcu_read_unlock_special.s) {
|
|
|
|
|
|