diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2014-10-21 16:23:08 -0400 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2014-11-03 22:20:43 -0500 |
commit | aa6da5140b784ece799f670bf532096f67aa7785 (patch) | |
tree | 23cbf7f15431d83ef85ddf0ce23e2ba44ea5cad5 /kernel/rcu/tree.c | |
parent | 38200cf24702e5d79ce6c8f4c62036c41845c62d (diff) |
rcu: Remove "cpu" argument to rcu_needs_cpu()
The "cpu" argument to rcu_needs_cpu() is always the current CPU, so drop
it. This in turn allows the "cpu" argument to rcu_cpu_has_callbacks()
to be removed, which allows the uses of "cpu" in both functions to be
replaced with a this_cpu_ptr(). Again, the anticipated cross-CPU uses
of these functions has been replaced by NO_HZ_FULL.
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: Pranith Kumar <bobby.prani@gmail.com>
Diffstat (limited to 'kernel/rcu/tree.c')
-rw-r--r-- | kernel/rcu/tree.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index b591f1459240..d678a98caf1d 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c | |||
@@ -3159,7 +3159,7 @@ static int rcu_pending(void) | |||
3159 | * non-NULL, store an indication of whether all callbacks are lazy. | 3159 | * non-NULL, store an indication of whether all callbacks are lazy. |
3160 | * (If there are no callbacks, all of them are deemed to be lazy.) | 3160 | * (If there are no callbacks, all of them are deemed to be lazy.) |
3161 | */ | 3161 | */ |
3162 | static int __maybe_unused rcu_cpu_has_callbacks(int cpu, bool *all_lazy) | 3162 | static int __maybe_unused rcu_cpu_has_callbacks(bool *all_lazy) |
3163 | { | 3163 | { |
3164 | bool al = true; | 3164 | bool al = true; |
3165 | bool hc = false; | 3165 | bool hc = false; |
@@ -3167,7 +3167,7 @@ static int __maybe_unused rcu_cpu_has_callbacks(int cpu, bool *all_lazy) | |||
3167 | struct rcu_state *rsp; | 3167 | struct rcu_state *rsp; |
3168 | 3168 | ||
3169 | for_each_rcu_flavor(rsp) { | 3169 | for_each_rcu_flavor(rsp) { |
3170 | rdp = per_cpu_ptr(rsp->rda, cpu); | 3170 | rdp = this_cpu_ptr(rsp->rda); |
3171 | if (!rdp->nxtlist) | 3171 | if (!rdp->nxtlist) |
3172 | continue; | 3172 | continue; |
3173 | hc = true; | 3173 | hc = true; |