From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752066AbbEDUdj (ORCPT ); Mon, 4 May 2015 16:33:39 -0400 Received: from e37.co.us.ibm.com ([32.97.110.158]:51569 "EHLO e37.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751015AbbEDUdb (ORCPT ); Mon, 4 May 2015 16:33:31 -0400 Date: Mon, 4 May 2015 13:33:26 -0700 From: "Paul E. McKenney" To: Josh Triplett Cc: Nicolas Iooss , Steven Rostedt , Mathieu Desnoyers , Lai Jiangshan , linux-kernel@vger.kernel.org Subject: Re: [PATCH] rcu: declare rcu_data variables in the section they are defined in Message-ID: <20150504203325.GE5381@linux.vnet.ibm.com> Reply-To: paulmck@linux.vnet.ibm.com References: <1430647073-19753-1-git-send-email-nicolas.iooss_linux@m4x.org> <20150503192701.GB2206@x> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150503192701.GB2206@x> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15050420-0025-0000-0000-00000A51A794 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, May 03, 2015 at 12:27:02PM -0700, Josh Triplett wrote: > On Sun, May 03, 2015 at 05:57:53PM +0800, Nicolas Iooss wrote: > > Commit 11bbb235c26f ("rcu: Use DEFINE_PER_CPU_SHARED_ALIGNED for > > rcu_data") replaced DEFINE_PER_CPU by DEFINE_PER_CPU_SHARED_ALIGNED in > > the definition of rcu_sched and rcu_bh without updating > > kernel/rcu/tree.h. > > > > This makes clang report a section mismatch (-Wsection warning) when > > building LLVMLinux because the variables are declared in .data..percpu > > but defined in .data..percpu..shared_aligned. > > > > Signed-off-by: Nicolas Iooss > > Good catch. > Reviewed-by: Josh Triplett Agreed, good catch! But don't we also need to worry about rcu_preempt_data? Also, given that tree_trace.c now uses iterators rather than direct access via the per-CPU variables, wouldn't the following be more appropriate? (-Very- lightly tested.) Thanx, Paul ------------------------------------------------------------------------ diff --git a/kernel/rcu/tree.h b/kernel/rcu/tree.h index da9f6adb5ff9..ee86870b1825 100644 --- a/kernel/rcu/tree.h +++ b/kernel/rcu/tree.h @@ -537,17 +537,6 @@ extern struct list_head rcu_struct_flavors; /* * RCU implementation internal declarations: */ -extern struct rcu_state rcu_sched_state; -DECLARE_PER_CPU(struct rcu_data, rcu_sched_data); - -extern struct rcu_state rcu_bh_state; -DECLARE_PER_CPU(struct rcu_data, rcu_bh_data); - -#ifdef CONFIG_PREEMPT_RCU -extern struct rcu_state rcu_preempt_state; -DECLARE_PER_CPU(struct rcu_data, rcu_preempt_data); -#endif /* #ifdef CONFIG_PREEMPT_RCU */ - #ifdef CONFIG_RCU_BOOST DECLARE_PER_CPU(unsigned int, rcu_cpu_kthread_status); DECLARE_PER_CPU(int, rcu_cpu_kthread_cpu);