summaryrefslogtreecommitdiff
path: root/include/linux/rcu_segcblist.h
diff options
context:
space:
mode:
authorFrederic Weisbecker <frederic@kernel.org>2020-11-13 13:13:16 +0100
committerPaul E. McKenney <paulmck@kernel.org>2021-01-06 16:24:19 -0800
commit65e560327fe68153a9ad7452d5fd3171a1927d33 (patch)
treee64a575eda8129d59a4d1fb1ff6bb3182ff2a5a1 /include/linux/rcu_segcblist.h
parentb4e6039e8af8c20dfbbdfcaebfcbd7c9d9ffe713 (diff)
rcu/nocb: Turn enabled/offload states into a common flag
This commit gathers the rcu_segcblist ->enabled and ->offloaded property field into a single ->flags bitmask to avoid further proliferation of individual u8 fields in the structure. This change prepares for the state formerly known as ->offloaded state to be modified at runtime. Cc: Josh Triplett <josh@joshtriplett.org> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Cc: Lai Jiangshan <jiangshanlai@gmail.com> Cc: Joel Fernandes <joel@joelfernandes.org> Cc: Neeraj Upadhyay <neeraju@codeaurora.org> Cc: Thomas Gleixner <tglx@linutronix.de> Inspired-by: Paul E. McKenney <paulmck@kernel.org> Tested-by: Boqun Feng <boqun.feng@gmail.com> Signed-off-by: Frederic Weisbecker <frederic@kernel.org> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'include/linux/rcu_segcblist.h')
-rw-r--r--include/linux/rcu_segcblist.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/linux/rcu_segcblist.h b/include/linux/rcu_segcblist.h
index 6c01f09a6456..4714b0263c76 100644
--- a/include/linux/rcu_segcblist.h
+++ b/include/linux/rcu_segcblist.h
@@ -63,6 +63,9 @@ struct rcu_cblist {
#define RCU_NEXT_TAIL 3
#define RCU_CBLIST_NSEGS 4
+#define SEGCBLIST_ENABLED BIT(0)
+#define SEGCBLIST_OFFLOADED BIT(1)
+
struct rcu_segcblist {
struct rcu_head *head;
struct rcu_head **tails[RCU_CBLIST_NSEGS];
@@ -73,8 +76,7 @@ struct rcu_segcblist {
long len;
#endif
long seglen[RCU_CBLIST_NSEGS];
- u8 enabled;
- u8 offloaded;
+ u8 flags;
};
#define RCU_SEGCBLIST_INITIALIZER(n) \