virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Will Deacon <will.deacon@arm.com>
Cc: Andrea Parri <andrea.parri@amarulasolutions.com>,
	linux-arch@vger.kernel.org,
	"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Daniel Lustig <dlustig@nvidia.com>,
	Akira Yokosawa <akiyks@gmail.com>,
	linux-kernel@vger.kernel.org, Nicholas Piggin <npiggin@gmail.com>,
	virtualization@lists.linux-foundation.org,
	David Howells <dhowells@redhat.com>,
	linux-sparse@vger.kernel.org,
	Alan Stern <stern@rowland.harvard.edu>,
	netdev@vger.kernel.org, Luc Maranget <luc.maranget@inria.fr>,
	Jade Alglave <j.alglave@ucl.ac.uk>,
	Boqun Feng <boqun.feng@gmail.com>,
	Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Subject: Re: [PATCH RFC 2/4] include/linux/compiler.h: allow memory operands
Date: Mon, 7 Jan 2019 13:16:50 -0500	[thread overview]
Message-ID: <20190107131350-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20190107175427.GB22911@fuggles.cambridge.arm.com>

On Mon, Jan 07, 2019 at 05:54:27PM +0000, Will Deacon wrote:
> On Wed, Jan 02, 2019 at 03:57:54PM -0500, Michael S. Tsirkin wrote:
> > We don't really care whether the variable is in-register
> > or in-memory. Relax the constraint accordingly.
> > 
> > Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> > ---
> >  include/linux/compiler.h | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/include/linux/compiler.h b/include/linux/compiler.h
> > index 1ad367b4cd8d..6601d39e8c48 100644
> > --- a/include/linux/compiler.h
> > +++ b/include/linux/compiler.h
> > @@ -154,7 +154,7 @@ void ftrace_likely_update(struct ftrace_likely_data *f, int val,
> >  #ifndef OPTIMIZER_HIDE_VAR
> >  /* Make the optimizer believe the variable can be manipulated arbitrarily. */
> >  #define OPTIMIZER_HIDE_VAR(var)						\
> > -	__asm__ ("" : "=r" (var) : "0" (var))
> > +	__asm__ ("" : "=rm" (var) : "0" (var))
> >  #endif
> 
> I think this can break for architectures with write-back addressing modes
> such as arm, where the "m" constraint is assumed to be evaluated precisely
> once in the asm block.
> 
> Will

Thanks, I'll drop this patch.

  reply	other threads:[~2019-01-07 18:16 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-02 20:57 [PATCH RFC 0/4] barriers using data dependency Michael S. Tsirkin
2019-01-02 20:57 ` [PATCH RFC 1/4] include/linux/compiler*.h: fix OPTIMIZER_HIDE_VAR Michael S. Tsirkin
2019-01-02 20:57 ` [PATCH RFC 2/4] include/linux/compiler.h: allow memory operands Michael S. Tsirkin
2019-01-02 20:57 ` [PATCH RFC 3/4] barriers: convert a control to a data dependency Michael S. Tsirkin
2019-01-02 20:58 ` [PATCH RFC 4/4] virtio: use dependent_ptr_mb Michael S. Tsirkin
     [not found] ` <20190102205715.14054-4-mst@redhat.com>
2019-01-02 21:00   ` [PATCH RFC 3/4] barriers: convert a control to a data dependency Matthew Wilcox
     [not found]   ` <20190102210024.GJ6310@bombadil.infradead.org>
2019-01-02 21:24     ` Michael S. Tsirkin
2019-01-07  3:58   ` Jason Wang
2019-01-07  4:23     ` Michael S. Tsirkin
2019-01-07  6:50       ` Jason Wang
2019-01-07  9:46       ` Peter Zijlstra
2019-01-07 13:36         ` Michael S. Tsirkin
2019-01-07 15:54           ` Peter Zijlstra
2019-01-07 16:22             ` Michael S. Tsirkin
     [not found]           ` <20190107190236.GF1215@linux.ibm.com>
2019-01-07 19:13             ` Michael S. Tsirkin
     [not found] ` <Pine.LNX.4.44L0.1901021629150.1375-100000@iolanthe.rowland.org>
2019-01-02 23:04   ` [PATCH RFC 0/4] barriers using " Michael S. Tsirkin
     [not found] ` <20190102205715.14054-3-mst@redhat.com>
2019-01-07 17:54   ` [PATCH RFC 2/4] include/linux/compiler.h: allow memory operands Will Deacon
2019-01-07 18:16     ` Michael S. Tsirkin [this message]
     [not found] ` <20190102205715.14054-2-mst@redhat.com>
     [not found]   ` <CAKwvOdk3b6mnpTEEyY-JFrej8K12w9oTMLqi7q5aNiRMyJo6Ow@mail.gmail.com>
2019-01-08 18:50     ` [PATCH RFC 1/4] include/linux/compiler*.h: fix OPTIMIZER_HIDE_VAR Michael S. Tsirkin
     [not found]     ` <CANiq72nEiw8+cZNnBOwF1ehv232ZJe5qzhdbaTEg0rOoV2p4sg@mail.gmail.com>
2019-01-09 14:50       ` Michael S. Tsirkin
2019-01-10  2:36       ` Michael S. Tsirkin
     [not found]       ` <20190109213543-mutt-send-email-mst@kernel.org>
2019-01-10 13:41         ` Dan Carpenter
     [not found]       ` <20190109094959-mutt-send-email-mst@kernel.org>
     [not found]         ` <CANiq72npFGsoHmBQUSNRLohDmMBNQFka8AcmhMz--QU1v2Aorg@mail.gmail.com>
2019-01-20 14:43           ` Michael S. Tsirkin

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=20190107131350-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=akiyks@gmail.com \
    --cc=andrea.parri@amarulasolutions.com \
    --cc=boqun.feng@gmail.com \
    --cc=dhowells@redhat.com \
    --cc=dlustig@nvidia.com \
    --cc=j.alglave@ucl.ac.uk \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sparse@vger.kernel.org \
    --cc=luc.maranget@inria.fr \
    --cc=luc.vanoostenryck@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=npiggin@gmail.com \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=peterz@infradead.org \
    --cc=stern@rowland.harvard.edu \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=will.deacon@arm.com \
    /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).