diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2013-11-18 04:27:16 +0100 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2014-02-18 01:03:09 +0100 |
commit | ffa83fb565fbc397cbafb4b71fd1cce276d4c3b6 (patch) | |
tree | c849b1ea3517d6853b7b4cd386a682187e314f09 /kernel/rcu/tree.c | |
parent | rcu: Optimize rcu_is_nocb_cpu() for RCU_NOCB_CPU_ALL (diff) | |
download | linux-ffa83fb565fbc397cbafb4b71fd1cce276d4c3b6.tar.xz linux-ffa83fb565fbc397cbafb4b71fd1cce276d4c3b6.zip |
rcu: Optimize rcu_needs_cpu() for RCU_NOCB_CPU_ALL
If CONFIG_RCU_NOCB_CPU_ALL=y, then rcu_needs_cpu() will always
return false, however, the current version nevertheless checks
for RCU callbacks. This commit therefore creates a static inline
implementation of rcu_needs_cpu() that unconditionally returns false
when CONFIG_RCU_NOCB_CPU_ALL=y.
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Diffstat (limited to 'kernel/rcu/tree.c')
-rw-r--r-- | kernel/rcu/tree.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index b3d116cd072d..c2c8234a0291 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c @@ -2880,7 +2880,7 @@ static int rcu_pending(int cpu) * non-NULL, store an indication of whether all callbacks are lazy. * (If there are no callbacks, all of them are deemed to be lazy.) */ -static int rcu_cpu_has_callbacks(int cpu, bool *all_lazy) +static int __maybe_unused rcu_cpu_has_callbacks(int cpu, bool *all_lazy) { bool al = true; bool hc = false; |