path: root/kernel/rcu/tree_plugin.h
diff options
authorPaul E. McKenney <>2015-08-06 15:16:57 -0700
committerPaul E. McKenney <>2015-09-20 21:16:21 -0700
commit5b74c458906fc4a62f932ee8bb801d29baf15fec (patch)
treeb5fde68e681dc589e40347ee939a1433d70bd77a /kernel/rcu/tree_plugin.h
parent0d43eb34f9aabcddf41c99b7af2d0ced33e9a3cc (diff)
rcu: Make ->cpu_no_qs be a union for aggregate OR
This commit converts the rcu_data structure's ->cpu_no_qs field to a union. The bytewise side of this union allows individual access to indications as to whether this CPU needs to find a quiescent state for a normal (.norm) and/or expedited (.exp) grace period. The setwise side of the union allows testing whether or not a quiescent state is needed at all, for either type of grace period. For now, only .norm is used. A later commit will introduce the expedited usage. Signed-off-by: Paul E. McKenney <>
Diffstat (limited to 'kernel/rcu/tree_plugin.h')
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h
index 6977ff0dccb9..7880202f1e38 100644
--- a/kernel/rcu/tree_plugin.h
+++ b/kernel/rcu/tree_plugin.h
@@ -265,11 +265,11 @@ static void rcu_preempt_ctxt_queue(struct rcu_node *rnp, struct rcu_data *rdp,
static void rcu_preempt_qs(void)
- if (__this_cpu_read(rcu_data_p->cpu_no_qs)) {
+ if (__this_cpu_read(rcu_data_p->cpu_no_qs.s)) {
- __this_cpu_write(rcu_data_p->cpu_no_qs, false);
+ __this_cpu_write(rcu_data_p->cpu_no_qs.b.norm, false);
barrier(); /* Coordinate with rcu_preempt_check_callbacks(). */
current->rcu_read_unlock_special.b.need_qs = false;
@@ -620,7 +620,7 @@ static void rcu_preempt_check_callbacks(void)
if (t->rcu_read_lock_nesting > 0 &&
__this_cpu_read(rcu_data_p->core_needs_qs) &&
- __this_cpu_read(rcu_data_p->cpu_no_qs))
+ __this_cpu_read(rcu_data_p->cpu_no_qs.b.norm))
t->rcu_read_unlock_special.b.need_qs = true;