From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
rjw@rjwysocki.net, konrad.wilk@oracle.com,
Ingo Molnar <mingo@kernel.org>,
tj@kernel.org, davem@davemloft.net, linux-acpi@vger.kernel.org,
netdev@vger.kernel.org
Subject: Re: [RFC][PATCH] tags: Fix DEFINE_PER_CPU expansions
Date: Tue, 1 Mar 2016 14:01:09 -0800 [thread overview]
Message-ID: <20160301220109.GS3577@linux.vnet.ibm.com> (raw)
In-Reply-To: <20160301213444.GZ6357@twins.programming.kicks-ass.net>
On Tue, Mar 01, 2016 at 10:34:44PM +0100, Peter Zijlstra wrote:
> On Tue, Mar 01, 2016 at 08:56:50AM -0800, Paul E. McKenney wrote:
> > +++ b/kernel/rcu/rcutorture.c
> > @@ -131,9 +131,9 @@ static unsigned long rcu_torture_current_version;
> > static struct rcu_torture rcu_tortures[10 * RCU_TORTURE_PIPE_LEN];
> > static DEFINE_SPINLOCK(rcu_torture_lock);
> > static DEFINE_PER_CPU(long [RCU_TORTURE_PIPE_LEN + 1],
> > - rcu_torture_count) = { 0 };
> > + rcu_torture_count);
>
> So the problem I was fixing is that the ctags regex needs the second
> argument for the DEFINE_PER_CPU() macro on the same line.
>
> So it would still need to be:
>
> static DEFINE_PER_CPU(long [RCU_TORTURE_PIPE_LEN + 1], rcu_torture_count);
>
> > static DEFINE_PER_CPU(long [RCU_TORTURE_PIPE_LEN + 1],
> > - rcu_torture_batch) = { 0 };
> > + rcu_torture_batch);
> > static atomic_t rcu_torture_wcount[RCU_TORTURE_PIPE_LEN + 1];
> > static atomic_t n_rcu_torture_alloc;
> > static atomic_t n_rcu_torture_alloc_fail;
Ah, like this, then.
Thanx, Paul
------------------------------------------------------------------------
commit 55d4929acdc66f00f27d79bfe273eeda01ec899f
Author: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Date: Tue Mar 1 08:52:19 2016 -0800
rcutorture: Remove redundant initialization to zero
The current code initializes the global per-CPU variables
rcu_torture_count and rcu_torture_batch to zero. However, C does this
initialization by default, and explicit initialization of per-CPU
variables now needs a different syntax if "make tags" is to work.
This commit therefore removes the initialization.
Reported-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c
index 1c2dc23ae07d..e75557368c04 100644
--- a/kernel/rcu/rcutorture.c
+++ b/kernel/rcu/rcutorture.c
@@ -130,10 +130,8 @@ static struct rcu_torture __rcu *rcu_torture_current;
static unsigned long rcu_torture_current_version;
static struct rcu_torture rcu_tortures[10 * RCU_TORTURE_PIPE_LEN];
static DEFINE_SPINLOCK(rcu_torture_lock);
-static DEFINE_PER_CPU(long [RCU_TORTURE_PIPE_LEN + 1],
- rcu_torture_count) = { 0 };
-static DEFINE_PER_CPU(long [RCU_TORTURE_PIPE_LEN + 1],
- rcu_torture_batch) = { 0 };
+static DEFINE_PER_CPU(long [RCU_TORTURE_PIPE_LEN + 1], rcu_torture_count);
+static DEFINE_PER_CPU(long [RCU_TORTURE_PIPE_LEN + 1], rcu_torture_batch);
static atomic_t rcu_torture_wcount[RCU_TORTURE_PIPE_LEN + 1];
static atomic_t n_rcu_torture_alloc;
static atomic_t n_rcu_torture_alloc_fail;
next prev parent reply other threads:[~2016-03-01 22:01 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-01 10:26 [RFC][PATCH] tags: Fix DEFINE_PER_CPU expansions Peter Zijlstra
2016-03-01 16:36 ` David Miller
2016-03-01 16:37 ` Tejun Heo
2016-03-01 18:18 ` Peter Zijlstra
2016-03-01 18:49 ` Tejun Heo
2016-03-01 16:56 ` Paul E. McKenney
2016-03-01 21:34 ` Peter Zijlstra
2016-03-01 22:01 ` Paul E. McKenney [this message]
2016-03-01 21:39 ` Rafael J. Wysocki
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=20160301220109.GS3577@linux.vnet.ibm.com \
--to=paulmck@linux.vnet.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=konrad.wilk@oracle.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=rjw@rjwysocki.net \
--cc=tj@kernel.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;
as well as URLs for NNTP newsgroup(s).