diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2014-10-21 11:03:57 -0400 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2014-11-03 22:20:18 -0500 |
commit | e3950ecd55383f7bd8a06a9649091ccfbbcf5505 (patch) | |
tree | d14992e63f8dd59567f2b699ac8b32e55e515b6a /kernel/rcu/tree.c | |
parent | c3377c2da6e594504c900d5ef72374c109e4ca99 (diff) |
rcu: Remove "cpu" argument to rcu_pending()
Because rcu_pending()'s argument is guaranteed to always be the current
CPU, drop the argument and replace per_cpu_ptr() with this_cpu_ptr().
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 | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index 3107811bba69..0670ba3a65d3 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c | |||
@@ -325,7 +325,7 @@ static void force_qs_rnp(struct rcu_state *rsp, | |||
325 | unsigned long *maxj), | 325 | unsigned long *maxj), |
326 | bool *isidle, unsigned long *maxj); | 326 | bool *isidle, unsigned long *maxj); |
327 | static void force_quiescent_state(struct rcu_state *rsp); | 327 | static void force_quiescent_state(struct rcu_state *rsp); |
328 | static int rcu_pending(int cpu); | 328 | static int rcu_pending(void); |
329 | 329 | ||
330 | /* | 330 | /* |
331 | * Return the number of RCU-sched batches processed thus far for debug & stats. | 331 | * Return the number of RCU-sched batches processed thus far for debug & stats. |
@@ -2421,7 +2421,7 @@ void rcu_check_callbacks(int user) | |||
2421 | rcu_bh_qs(); | 2421 | rcu_bh_qs(); |
2422 | } | 2422 | } |
2423 | rcu_preempt_check_callbacks(smp_processor_id()); | 2423 | rcu_preempt_check_callbacks(smp_processor_id()); |
2424 | if (rcu_pending(smp_processor_id())) | 2424 | if (rcu_pending()) |
2425 | invoke_rcu_core(); | 2425 | invoke_rcu_core(); |
2426 | if (user) | 2426 | if (user) |
2427 | rcu_note_voluntary_context_switch(current); | 2427 | rcu_note_voluntary_context_switch(current); |
@@ -3144,12 +3144,12 @@ static int __rcu_pending(struct rcu_state *rsp, struct rcu_data *rdp) | |||
3144 | * by the current CPU, returning 1 if so. This function is part of the | 3144 | * by the current CPU, returning 1 if so. This function is part of the |
3145 | * RCU implementation; it is -not- an exported member of the RCU API. | 3145 | * RCU implementation; it is -not- an exported member of the RCU API. |
3146 | */ | 3146 | */ |
3147 | static int rcu_pending(int cpu) | 3147 | static int rcu_pending(void) |
3148 | { | 3148 | { |
3149 | struct rcu_state *rsp; | 3149 | struct rcu_state *rsp; |
3150 | 3150 | ||
3151 | for_each_rcu_flavor(rsp) | 3151 | for_each_rcu_flavor(rsp) |
3152 | if (__rcu_pending(rsp, per_cpu_ptr(rsp->rda, cpu))) | 3152 | if (__rcu_pending(rsp, this_cpu_ptr(rsp->rda))) |
3153 | return 1; | 3153 | return 1; |
3154 | return 0; | 3154 | return 0; |
3155 | } | 3155 | } |