summaryrefslogtreecommitdiff
path: root/kernel/rcu/rcu_segcblist.h
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/rcu/rcu_segcblist.h')
-rw-r--r--kernel/rcu/rcu_segcblist.h19
1 files changed, 6 insertions, 13 deletions
diff --git a/kernel/rcu/rcu_segcblist.h b/kernel/rcu/rcu_segcblist.h
index 311060279f1a..9a19328ff251 100644
--- a/kernel/rcu/rcu_segcblist.h
+++ b/kernel/rcu/rcu_segcblist.h
@@ -80,17 +80,12 @@ static inline bool rcu_segcblist_is_enabled(struct rcu_segcblist *rsclp)
return rcu_segcblist_test_flags(rsclp, SEGCBLIST_ENABLED);
}
-/* Is the specified rcu_segcblist offloaded? */
+/* Is the specified rcu_segcblist offloaded, or is SEGCBLIST_SOFTIRQ_ONLY set? */
static inline bool rcu_segcblist_is_offloaded(struct rcu_segcblist *rsclp)
{
- if (IS_ENABLED(CONFIG_RCU_NOCB_CPU)) {
- /*
- * Complete de-offloading happens only when SEGCBLIST_SOFTIRQ_ONLY
- * is set.
- */
- if (!rcu_segcblist_test_flags(rsclp, SEGCBLIST_SOFTIRQ_ONLY))
- return true;
- }
+ if (IS_ENABLED(CONFIG_RCU_NOCB_CPU) &&
+ !rcu_segcblist_test_flags(rsclp, SEGCBLIST_SOFTIRQ_ONLY))
+ return true;
return false;
}
@@ -99,10 +94,8 @@ static inline bool rcu_segcblist_completely_offloaded(struct rcu_segcblist *rscl
{
int flags = SEGCBLIST_KTHREAD_CB | SEGCBLIST_KTHREAD_GP | SEGCBLIST_OFFLOADED;
- if (IS_ENABLED(CONFIG_RCU_NOCB_CPU)) {
- if ((rsclp->flags & flags) == flags)
- return true;
- }
+ if (IS_ENABLED(CONFIG_RCU_NOCB_CPU) && (rsclp->flags & flags) == flags)
+ return true;
return false;
}