Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1304703
| From | "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: linux-next: build failure after merge of the rcu tree |
| Date | 2016-01-08 17:20 +0100 |
| Message-ID | <qOHVF-HA-31@gated-at.bofh.it> (permalink) |
| References | (5 earlier) <qOwxb-1it-1@gated-at.bofh.it> <qOx9T-1y2-3@gated-at.bofh.it> <qOxjA-1Bf-11@gated-at.bofh.it> <qOHCj-kf-23@gated-at.bofh.it> <qOHCj-kf-21@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Fri, Jan 08, 2016 at 10:57:27AM -0500, Tejun Heo wrote: > On Fri, Jan 08, 2016 at 07:53:41AM -0800, Paul E. McKenney wrote: > > commit 61822ff81839ee3c5b6094ce348944d972b87892 > > Author: Paul E. McKenney <paulmck@linux.vnet.ibm.com> > > Date: Fri Jan 8 07:43:50 2016 -0800 > > > > rcu: Document unique-name limitation for DEFINE_STATIC_SRCU() > > > > SRCU uses per-CPU variables, and DEFINE_STATIC_SRCU() uses a static > > per-CPU variable. However, per-CPU variables have significant > > restrictions, for example, names of per-CPU variables must be globally > > unique, even if declared static. These restrictions carry over to > > DEFINE_STATIC_SRCU(), and this commit therefore documents these > > restrictions. > > > > Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> > > Reported-by: kbuild test robot <fengguang.wu@intel.com> > > Suggested-by: Boqun Feng <boqun.feng@gmail.com> > > Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> > > > > diff --git a/include/linux/srcu.h b/include/linux/srcu.h > > index f5f80c5643ac..dc8eb63c6568 100644 > > --- a/include/linux/srcu.h > > +++ b/include/linux/srcu.h > > @@ -99,8 +99,23 @@ void process_srcu(struct work_struct *work); > > } > > > > /* > > - * define and init a srcu struct at build time. > > - * dont't call init_srcu_struct() nor cleanup_srcu_struct() on it. > > + * Define and initialize a srcu struct at build time. > > + * Do -not- call init_srcu_struct() nor cleanup_srcu_struct() on it. > > + * > > + * Note that although DEFINE_STATIC_SRCU() hides the name from other > > + * files, the per-CPU variable rules nevertheless require that the > > + * chosen name be globally unique. These rules also prohibit use of > > + * DEFINE_STATIC_SRCU() within a function. If these rules are too > > + * restrictive, declare the srcu_struct manually. For example, in > > + * each file: > > + * > > + * static struct srcu_struct my_srcu; > > + * > > + * Then, before the first use of each my_srcu, manually initialize it: > > + * > > + * init_srcu_struct(&my_srcu); > > + * > > + * See include/linux/percpu-defs.h for the rules on per-CPU variables. > > FWIW, > > Reviewed-by: Tejun Heo <tj@kernel.org> Applied, thank you! > Thanks Stephen for posting the rules around static percpu definitions. Me too! Hey, it was building fine with all of my configurations, so I was really beginning to wonder if this was some sort of early April Fools joke. ;-) > I wonder whether there is a better way to tell people what's going on. I hope so. ;-) Thanx, Paul
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
linux-next: build failure after merge of the rcu tree Stephen Rothwell <sfr@canb.auug.org.au> - 2016-01-07 10:00 +0100
Re: linux-next: build failure after merge of the rcu tree "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-01-07 19:30 +0100
Re: linux-next: build failure after merge of the rcu tree Stephen Rothwell <sfr@canb.auug.org.au> - 2016-01-07 21:20 +0100
Re: linux-next: build failure after merge of the rcu tree "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-01-07 22:00 +0100
Re: linux-next: build failure after merge of the rcu tree Boqun Feng <boqun.feng@gmail.com> - 2016-01-08 02:40 +0100
Re: linux-next: build failure after merge of the rcu tree "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-01-08 04:50 +0100
Re: linux-next: build failure after merge of the rcu tree Stephen Rothwell <sfr@canb.auug.org.au> - 2016-01-08 05:10 +0100
Re: linux-next: build failure after merge of the rcu tree "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-01-08 05:50 +0100
Re: linux-next: build failure after merge of the rcu tree Boqun Feng <boqun.feng@gmail.com> - 2016-01-08 06:00 +0100
Re: linux-next: build failure after merge of the rcu tree Tejun Heo <tj@kernel.org> - 2016-01-08 17:00 +0100
Re: linux-next: build failure after merge of the rcu tree "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-01-08 17:20 +0100
Re: linux-next: build failure after merge of the rcu tree Boqun Feng <boqun.feng@gmail.com> - 2016-01-08 17:00 +0100
Re: linux-next: build failure after merge of the rcu tree "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-01-08 17:00 +0100
Re: linux-next: build failure after merge of the rcu tree Stephen Rothwell <sfr@canb.auug.org.au> - 2016-01-08 05:20 +0100
csiph-web