Commit fa07a58f authored by Christoph Lameter's avatar Christoph Lameter Committed by Paul E. McKenney

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: default avatarChristoph Lameter <cl@linux.com>
Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: default avatarJosh Triplett <josh@joshtriplett.org>
parent 8c96ae1d
...@@ -2008,7 +2008,7 @@ rcu_send_cbs_to_orphanage(int cpu, struct rcu_state *rsp, ...@@ -2008,7 +2008,7 @@ rcu_send_cbs_to_orphanage(int cpu, struct rcu_state *rsp,
static void rcu_adopt_orphan_cbs(struct rcu_state *rsp, unsigned long flags) static void rcu_adopt_orphan_cbs(struct rcu_state *rsp, unsigned long flags)
{ {
int i; int i;
struct rcu_data *rdp = __this_cpu_ptr(rsp->rda); struct rcu_data *rdp = raw_cpu_ptr(rsp->rda);
/* No-CBs CPUs are handled specially. */ /* No-CBs CPUs are handled specially. */
if (rcu_nocb_adopt_orphan_cbs(rsp, rdp, flags)) if (rcu_nocb_adopt_orphan_cbs(rsp, rdp, flags))
...@@ -2392,7 +2392,7 @@ __rcu_process_callbacks(struct rcu_state *rsp) ...@@ -2392,7 +2392,7 @@ __rcu_process_callbacks(struct rcu_state *rsp)
{ {
unsigned long flags; unsigned long flags;
bool needwake; bool needwake;
struct rcu_data *rdp = __this_cpu_ptr(rsp->rda); struct rcu_data *rdp = raw_cpu_ptr(rsp->rda);
WARN_ON_ONCE(rdp->beenonline == 0); WARN_ON_ONCE(rdp->beenonline == 0);
...@@ -3066,7 +3066,7 @@ static void rcu_barrier_callback(struct rcu_head *rhp) ...@@ -3066,7 +3066,7 @@ static void rcu_barrier_callback(struct rcu_head *rhp)
static void rcu_barrier_func(void *type) static void rcu_barrier_func(void *type)
{ {
struct rcu_state *rsp = type; struct rcu_state *rsp = type;
struct rcu_data *rdp = __this_cpu_ptr(rsp->rda); struct rcu_data *rdp = raw_cpu_ptr(rsp->rda);
_rcu_barrier_trace(rsp, "IRQ", -1, rsp->n_barrier_done); _rcu_barrier_trace(rsp, "IRQ", -1, rsp->n_barrier_done);
atomic_inc(&rsp->barrier_cpu_count); atomic_inc(&rsp->barrier_cpu_count);
......
...@@ -1809,7 +1809,7 @@ static void rcu_oom_notify_cpu(void *unused) ...@@ -1809,7 +1809,7 @@ static void rcu_oom_notify_cpu(void *unused)
struct rcu_data *rdp; struct rcu_data *rdp;
for_each_rcu_flavor(rsp) { for_each_rcu_flavor(rsp) {
rdp = __this_cpu_ptr(rsp->rda); rdp = raw_cpu_ptr(rsp->rda);
if (rdp->qlen_lazy != 0) { if (rdp->qlen_lazy != 0) {
atomic_inc(&oom_callback_count); atomic_inc(&oom_callback_count);
rsp->call(&rdp->oom_head, rcu_oom_callback); rsp->call(&rdp->oom_head, rcu_oom_callback);
...@@ -1951,7 +1951,7 @@ static void increment_cpu_stall_ticks(void) ...@@ -1951,7 +1951,7 @@ static void increment_cpu_stall_ticks(void)
struct rcu_state *rsp; struct rcu_state *rsp;
for_each_rcu_flavor(rsp) for_each_rcu_flavor(rsp)
__this_cpu_ptr(rsp->rda)->ticks_this_gp++; raw_cpu_inc(rsp->rda->ticks_this_gp);
} }
#else /* #ifdef CONFIG_RCU_CPU_STALL_INFO */ #else /* #ifdef CONFIG_RCU_CPU_STALL_INFO */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment