public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Josh Triplett <josh@joshtriplett.org>
Cc: Nicolas Iooss <nicolas.iooss_linux@m4x.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	Lai Jiangshan <laijs@cn.fujitsu.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] rcu: declare rcu_data variables in the section they are defined in
Date: Mon, 4 May 2015 13:33:26 -0700	[thread overview]
Message-ID: <20150504203325.GE5381@linux.vnet.ibm.com> (raw)
In-Reply-To: <20150503192701.GB2206@x>

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 <nicolas.iooss_linux@m4x.org>
> 
> Good catch.
> Reviewed-by: Josh Triplett <josh@joshtriplett.org>

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);


  reply	other threads:[~2015-05-04 20:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-03  9:57 [PATCH] rcu: declare rcu_data variables in the section they are defined in Nicolas Iooss
2015-05-03 19:27 ` Josh Triplett
2015-05-04 20:33   ` Paul E. McKenney [this message]
2015-05-05  0:40     ` Nicolas Iooss
2015-05-05  5:55       ` Paul E. McKenney
2015-05-05 13:57         ` [PATCH] rcu: make rcu_*_data variables static Nicolas Iooss
2015-05-05 23:25           ` josh
2015-05-06  6:09             ` 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=20150504203325.GE5381@linux.vnet.ibm.com \
    --to=paulmck@linux.vnet.ibm.com \
    --cc=josh@joshtriplett.org \
    --cc=laijs@cn.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=nicolas.iooss_linux@m4x.org \
    --cc=rostedt@goodmis.org \
    /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