diff options
author | Christoph Lameter <cl@linux.com> | 2014-04-15 15:20:12 -0400 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2014-04-29 11:45:35 -0400 |
commit | fa07a58f71ee23a82597ce337126982d0cc60b72 (patch) | |
tree | 9d6b42e2c700e63a45120aaf31b1fdf8e500960e | |
parent | 8c96ae1dfa1608b92ddbf8bb285d7269832e4ac0 (diff) |
rcu: Replace __this_cpu_ptr() uses with raw_cpu_ptr()
__this_cpu_ptr is being phased out.
One special case is increment_cpu_stall_ticks().
A per cpu variable is incremented so use raw_cpu_inc().
Cc: Dipankar Sarma <dipankar@in.ibm.com>
Signed-off-by: Christoph Lameter <cl@linux.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
-rw-r--r-- | kernel/rcu/tree.c | 6 | ||||
-rw-r--r-- | kernel/rcu/tree_plugin.h | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index ecd7e046de76..d3e023e24c6f 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c | |||
@@ -2008,7 +2008,7 @@ rcu_send_cbs_to_orphanage(int cpu, struct rcu_state *rsp, | |||
2008 | static void rcu_adopt_orphan_cbs(struct rcu_state *rsp, unsigned long flags) | 2008 | static void rcu_adopt_orphan_cbs(struct rcu_state *rsp, unsigned long flags) |
2009 | { | 2009 | { |
2010 | int i; | 2010 | int i; |
2011 | struct rcu_data *rdp = __this_cpu_ptr(rsp->rda); | 2011 | struct rcu_data *rdp = raw_cpu_ptr(rsp->rda); |
2012 | 2012 | ||
2013 | /* No-CBs CPUs are handled specially. */ | 2013 | /* No-CBs CPUs are handled specially. */ |
2014 | if (rcu_nocb_adopt_orphan_cbs(rsp, rdp, flags)) | 2014 | if (rcu_nocb_adopt_orphan_cbs(rsp, rdp, flags)) |
@@ -2392,7 +2392,7 @@ __rcu_process_callbacks(struct rcu_state *rsp) | |||
2392 | { | 2392 | { |
2393 | unsigned long flags; | 2393 | unsigned long flags; |
2394 | bool needwake; | 2394 | bool needwake; |
2395 | struct rcu_data *rdp = __this_cpu_ptr(rsp->rda); | 2395 | struct rcu_data *rdp = raw_cpu_ptr(rsp->rda); |
2396 | 2396 | ||
2397 | WARN_ON_ONCE(rdp->beenonline == 0); | 2397 | WARN_ON_ONCE(rdp->beenonline == 0); |
2398 | 2398 | ||
@@ -3066,7 +3066,7 @@ static void rcu_barrier_callback(struct rcu_head *rhp) | |||
3066 | static void rcu_barrier_func(void *type) | 3066 | static void rcu_barrier_func(void *type) |
3067 | { | 3067 | { |
3068 | struct rcu_state *rsp = type; | 3068 | struct rcu_state *rsp = type; |
3069 | struct rcu_data *rdp = __this_cpu_ptr(rsp->rda); | 3069 | struct rcu_data *rdp = raw_cpu_ptr(rsp->rda); |
3070 | 3070 | ||
3071 | _rcu_barrier_trace(rsp, "IRQ", -1, rsp->n_barrier_done); | 3071 | _rcu_barrier_trace(rsp, "IRQ", -1, rsp->n_barrier_done); |
3072 | atomic_inc(&rsp->barrier_cpu_count); | 3072 | atomic_inc(&rsp->barrier_cpu_count); |
diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h index f7593c2536b0..2e579c38bd91 100644 --- a/kernel/rcu/tree_plugin.h +++ b/kernel/rcu/tree_plugin.h | |||
@@ -1809,7 +1809,7 @@ static void rcu_oom_notify_cpu(void *unused) | |||
1809 | struct rcu_data *rdp; | 1809 | struct rcu_data *rdp; |
1810 | 1810 | ||
1811 | for_each_rcu_flavor(rsp) { | 1811 | for_each_rcu_flavor(rsp) { |
1812 | rdp = __this_cpu_ptr(rsp->rda); | 1812 | rdp = raw_cpu_ptr(rsp->rda); |
1813 | if (rdp->qlen_lazy != 0) { | 1813 | if (rdp->qlen_lazy != 0) { |
1814 | atomic_inc(&oom_callback_count); | 1814 | atomic_inc(&oom_callback_count); |
1815 | rsp->call(&rdp->oom_head, rcu_oom_callback); | 1815 | rsp->call(&rdp->oom_head, rcu_oom_callback); |
@@ -1951,7 +1951,7 @@ static void increment_cpu_stall_ticks(void) | |||
1951 | struct rcu_state *rsp; | 1951 | struct rcu_state *rsp; |
1952 | 1952 | ||
1953 | for_each_rcu_flavor(rsp) | 1953 | for_each_rcu_flavor(rsp) |
1954 | __this_cpu_ptr(rsp->rda)->ticks_this_gp++; | 1954 | raw_cpu_inc(rsp->rda->ticks_this_gp); |
1955 | } | 1955 | } |
1956 | 1956 | ||
1957 | #else /* #ifdef CONFIG_RCU_CPU_STALL_INFO */ | 1957 | #else /* #ifdef CONFIG_RCU_CPU_STALL_INFO */ |