From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753083AbaAQPWz (ORCPT ); Fri, 17 Jan 2014 10:22:55 -0500 Received: from qmta15.emeryville.ca.mail.comcast.net ([76.96.27.228]:53871 "EHLO qmta15.emeryville.ca.mail.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752662AbaAQPSo (ORCPT ); Fri, 17 Jan 2014 10:18:44 -0500 Message-Id: <20140117151836.680075812@linux.com> Date: Fri, 17 Jan 2014 09:18:34 -0600 From: Christoph Lameter To: Tejun Heo Cc: akpm@linuxfoundation.org, rostedt@goodmis.org, linux-kernel@vger.kernel.org, Ingo Molnar , Peter Zijlstra , Thomas Gleixner , Dipankar Sarma , "Paul E. McKenney" Subject: [PATCH 22/41] rcu: Replace __this_cpu_ptr uses with raw_cpu_ptr References: <20140117151812.770437629@linux.com> Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline; filename=this_rcu Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [Patch depends on another patch in this series that introduces raw_cpu_ops] __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 Cc: "Paul E. McKenney" Signed-off-by: Christoph Lameter Index: linux/kernel/rcu/tree.c =================================================================== --- linux.orig/kernel/rcu/tree.c 2013-12-02 16:07:53.894519622 -0600 +++ linux/kernel/rcu/tree.c 2013-12-02 16:07:53.894519622 -0600 @@ -1904,7 +1904,7 @@ rcu_send_cbs_to_orphanage(int cpu, struc static void rcu_adopt_orphan_cbs(struct rcu_state *rsp) { 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)) @@ -2283,7 +2283,7 @@ static void __rcu_process_callbacks(struct rcu_state *rsp) { unsigned long flags; - struct rcu_data *rdp = __this_cpu_ptr(rsp->rda); + struct rcu_data *rdp = raw_cpu_ptr(rsp->rda); WARN_ON_ONCE(rdp->beenonline == 0); @@ -2871,7 +2871,7 @@ static void rcu_barrier_callback(struct 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); Index: linux/kernel/rcu/tree_plugin.h =================================================================== --- linux.orig/kernel/rcu/tree_plugin.h 2013-12-02 16:07:53.894519622 -0600 +++ linux/kernel/rcu/tree_plugin.h 2013-12-02 16:07:53.894519622 -0600 @@ -1830,7 +1830,7 @@ static void rcu_oom_notify_cpu(void *unu 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); @@ -1971,7 +1971,7 @@ static void increment_cpu_stall_ticks(vo 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 */