mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: linux-kernel@vger.kernel.org
Cc: mingo@kernel.org, laijs@cn.fujitsu.com, dipankar@in.ibm.com,
	akpm@linux-foundation.org, mathieu.desnoyers@efficios.com,
	josh@joshtriplett.org, niv@us.ibm.com, tglx@linutronix.de,
	peterz@infradead.org, rostedt@goodmis.org, dhowells@redhat.com,
	edumazet@google.com, darren@dvhart.com, fweisbec@gmail.com,
	oleg@redhat.com, sbw@mit.edu, Christoph Lameter <cl@linux.com>,
	"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Subject: [PATCH tip/core/rcu 18/19] rcu: Replace __this_cpu_ptr() uses with raw_cpu_ptr()
Date: Mon, 28 Apr 2014 16:56:31 -0700	[thread overview]
Message-ID: <1398729392-15087-18-git-send-email-paulmck@linux.vnet.ibm.com> (raw)
In-Reply-To: <1398729392-15087-1-git-send-email-paulmck@linux.vnet.ibm.com>

From: Christoph Lameter <cl@linux.com>

__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>
---
 kernel/rcu/tree.c        | 6 +++---
 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,
 static void rcu_adopt_orphan_cbs(struct rcu_state *rsp, unsigned long flags)
 {
 	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. */
 	if (rcu_nocb_adopt_orphan_cbs(rsp, rdp, flags))
@@ -2392,7 +2392,7 @@ __rcu_process_callbacks(struct rcu_state *rsp)
 {
 	unsigned long flags;
 	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);
 
@@ -3066,7 +3066,7 @@ static void rcu_barrier_callback(struct rcu_head *rhp)
 static void rcu_barrier_func(void *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);
 	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)
 	struct rcu_data *rdp;
 
 	for_each_rcu_flavor(rsp) {
-		rdp = __this_cpu_ptr(rsp->rda);
+		rdp = raw_cpu_ptr(rsp->rda);
 		if (rdp->qlen_lazy != 0) {
 			atomic_inc(&oom_callback_count);
 			rsp->call(&rdp->oom_head, rcu_oom_callback);
@@ -1951,7 +1951,7 @@ static void increment_cpu_stall_ticks(void)
 	struct rcu_state *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 */
-- 
1.8.1.5


  parent reply	other threads:[~2014-04-28 23:58 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-28 23:56 [PATCH tip/core/rcu 0/3] Miscellaneous fixes for 3.16 Paul E. McKenney
2014-04-28 23:56 ` [PATCH tip/core/rcu 01/19] rcu: Protect ->gp_flags accesses with ACCESS_ONCE() Paul E. McKenney
2014-04-28 23:56   ` [PATCH tip/core/rcu 02/19] rcu: Fix incorrect notes for code Paul E. McKenney
2014-04-28 23:56   ` [PATCH tip/core/rcu 03/19] rcu: Print negatives for stall-warning counter wraparound Paul E. McKenney
2014-04-28 23:56   ` [PATCH tip/core/rcu 04/19] rcu: Update cpu_needs_another_gp() for futures from non-NOCB CPUs Paul E. McKenney
2014-04-28 23:56   ` [PATCH tip/core/rcu 05/19] rcu: Remove unused rcu_data structure field Paul E. McKenney
2014-04-28 23:56   ` [PATCH tip/core/rcu 06/19] rcu: Protect uses of jiffies_stall field with ACCESS_ONCE() Paul E. McKenney
2014-04-28 23:56   ` [PATCH tip/core/rcu 07/19] rcu: Make callers awaken grace-period kthread Paul E. McKenney
2014-04-28 23:56   ` [PATCH tip/core/rcu 08/19] rcu: Remove "extern" from function declaration in include/linux/rcupdate.h Paul E. McKenney
2014-04-28 23:56   ` [PATCH tip/core/rcu 09/19] rcu: Protect uses of ->jiffies_stall with ACCESS_ONCE() Paul E. McKenney
2014-04-28 23:56   ` [PATCH tip/core/rcu 10/19] rcu: Add event tracing to dyntick_save_progress_counter() Paul E. McKenney
2014-04-28 23:56   ` [PATCH tip/core/rcu 11/19] rcu: Replace NR_CPUS with nr_cpu_ids Paul E. McKenney
2014-04-28 23:56   ` [PATCH tip/core/rcu 12/19] rcu: Consolidate kfree_call_rcu() to use rcu_state pointer Paul E. McKenney
2014-04-28 23:56   ` [PATCH tip/core/rcu 13/19] rcu: Merge rcu_sched_force_quiescent_state() with rcu_force_quiescent_state() Paul E. McKenney
2014-04-28 23:56   ` [PATCH tip/core/rcu 14/19] rcu: Document RCU_INIT_POINTER()'s lack of ordering guarantees Paul E. McKenney
2014-04-28 23:56   ` [PATCH tip/core/rcu 15/19] rcu: Bind RCU grace-period kthreads if NO_HZ_FULL Paul E. McKenney
2014-04-28 23:56   ` [PATCH tip/core/rcu 16/19] rcu: Make large and small sysidle systems use same state machine Paul E. McKenney
2014-04-28 23:56   ` [PATCH tip/core/rcu 17/19] rcu: Remove duplicate resched_cpu() declaration Paul E. McKenney
2014-04-28 23:56   ` Paul E. McKenney [this message]
2014-04-28 23:56   ` [PATCH tip/core/rcu 19/19] softirq: A single rcu_bh_qs() call per softirq set is enough Paul E. McKenney
2014-04-29  3:23 ` [PATCH tip/core/rcu 0/3] Miscellaneous fixes for 3.16 Josh Triplett
2014-04-29 15:46   ` Paul E. McKenney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1398729392-15087-18-git-send-email-paulmck@linux.vnet.ibm.com \
    --to=paulmck@linux.vnet.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=cl@linux.com \
    --cc=darren@dvhart.com \
    --cc=dhowells@redhat.com \
    --cc=dipankar@in.ibm.com \
    --cc=edumazet@google.com \
    --cc=fweisbec@gmail.com \
    --cc=josh@joshtriplett.org \
    --cc=laijs@cn.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mingo@kernel.org \
    --cc=niv@us.ibm.com \
    --cc=oleg@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=sbw@mit.edu \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®