From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: joel@joelfernandes.org, mathieu.desnoyers@efficios.com,
peterz@infradead.org, tj@kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH RFC] Make call_srcu() available during very early boot
Date: Tue, 14 Aug 2018 10:44:43 -0700 [thread overview]
Message-ID: <20180814174443.GG24813@linux.vnet.ibm.com> (raw)
In-Reply-To: <20180814132453.093a4921@gandalf.local.home>
On Tue, Aug 14, 2018 at 01:24:53PM -0400, Steven Rostedt wrote:
> On Tue, 14 Aug 2018 10:06:18 -0700
> "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> wrote:
>
>
> > > > #define __SRCU_STRUCT_INIT(name, pcpu_name) \
> > > > - { \
> > > > - .sda = &pcpu_name, \
> > > > - .lock = __SPIN_LOCK_UNLOCKED(name.lock), \
> > > > - .srcu_gp_seq_needed = 0 - 1, \
> > > > - __SRCU_DEP_MAP_INIT(name) \
> > > > - }
> > > > +{ \
> > > > + .sda = &pcpu_name, \
> > > > + .lock = __SPIN_LOCK_UNLOCKED(name.lock), \
> > > > + .srcu_gp_seq_needed = 0 - 1, \
> > >
> > > Interesting initialization of -1. This was there before, but still
> > > interesting none the less.
> >
> > If I recall correctly, this subterfuge suppresses compiler complaints
> > about initializing an unsigned long with a negative number. :-/
>
> Did you try:
>
> .srcu_gp_seq_needed = -1UL,
>
> ?
Works for my compiler, not sure what set of complaints pushed me in that
direction.
Thanx, Paul
next prev parent reply other threads:[~2018-08-14 17:50 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-14 16:24 [PATCH RFC] Make call_srcu() available during very early boot Paul E. McKenney
2018-08-14 16:49 ` Steven Rostedt
2018-08-14 17:06 ` Paul E. McKenney
2018-08-14 17:24 ` Steven Rostedt
2018-08-14 17:44 ` Paul E. McKenney [this message]
2018-08-14 18:34 ` Steven Rostedt
2018-08-14 18:41 ` Paul E. McKenney
2018-08-14 21:02 ` Paul E. McKenney
2018-08-17 16:08 ` Tejun Heo
2018-08-17 16:31 ` 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=20180814174443.GG24813@linux.vnet.ibm.com \
--to=paulmck@linux.vnet.ibm.com \
--cc=joel@joelfernandes.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.