xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Will Deacon <will.deacon@arm.com>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: "julien.grall@citrix.com" <julien.grall@citrix.com>,
	Catalin Marinas <Catalin.Marinas@arm.com>,
	"stefano.stabellini@eu.citrix.com"
	<stefano.stabellini@eu.citrix.com>, Tim Deegan <tim@xen.org>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: [PATCH 2/3] xen/arm64: resync atomics and spinlock asm with Linux
Date: Tue, 30 Jul 2013 10:45:35 +0100	[thread overview]
Message-ID: <20130730094535.GG11527@mudshark.cambridge.arm.com> (raw)
In-Reply-To: <1375176852.11701.68.camel@kazak.uk.xensource.com>

On Tue, Jul 30, 2013 at 10:34:12AM +0100, Ian Campbell wrote:
> On Mon, 2013-07-29 at 19:05 +0100, Will Deacon wrote:
> > On Mon, Jul 29, 2013 at 05:13:02PM +0100, Ian Campbell wrote:
> > > On Mon, 2013-07-29 at 17:02 +0100, Tim Deegan wrote:
> > > > But I don't understand the new 'memory' clobbers around in this patch.
> > > > Or rather, I don't understand why there are memory clobbers but not
> > > > DMBs.
> > 
> > The acquire/release instructions imply half barriers, but GCC may still
> > re-order instructions across them unless we include the memory clobber.
> 
> The instructions which Tim is querying patch the are
> load/store-exclusive (ldxr,stxr) not acquire/release (ldaxr/stlxr et al)
> ones. The a/r ones do indeed have implicit barriers but do the l/s-excl
> do too?
> 
> The ARM ARM Tim quoted was the v7 version but I don't see anything in
> the v8 docs which I have available (which I know are incomplete and may
> well be out of date) which says anything about barriers (implicit or
> otherwise) wrt the l/s-excl instructions. I do see stuff relating to the
> a/r instructions having implicit barriers.

Ah sorry, should've looked more closely. This is basically because not all
atomic operations in Linux imply barriers.

Take a look at Documentation/atomic_ops.txt and check whether it matches the
semantics required by Xen.

Will

  reply	other threads:[~2013-07-30  9:45 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-19 15:19 [PATCH 0/3] xen: arm: update asm primitives (bitops, spinlocks, atomics) Ian Campbell
2013-07-19 15:20 ` [PATCH 1/3] xen/arm64: Assembly optimized bitops from Linux Ian Campbell
2013-07-19 15:20 ` [PATCH 2/3] xen/arm64: resync atomics and spinlock asm with Linux Ian Campbell
2013-07-29 16:02   ` Tim Deegan
2013-07-29 16:13     ` Ian Campbell
2013-07-29 18:05       ` Will Deacon
2013-07-30  9:34         ` Ian Campbell
2013-07-30  9:45           ` Will Deacon [this message]
2013-07-30  9:55             ` Ian Campbell
2013-07-30  9:59               ` Will Deacon
2013-07-30 10:12                 ` Ian Campbell
2013-07-19 15:20 ` [PATCH 3/3] xen: arm: retry trylock if strex fails on free lock Ian Campbell
2013-07-29 15:52   ` Tim Deegan
2013-07-29 16:20     ` Ian Campbell
2013-07-29 16:25       ` Tim Deegan
2013-08-22 14:56 ` [PATCH 0/3] xen: arm: update asm primitives (bitops, spinlocks, atomics) Ian Campbell

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=20130730094535.GG11527@mudshark.cambridge.arm.com \
    --to=will.deacon@arm.com \
    --cc=Catalin.Marinas@arm.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=julien.grall@citrix.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=tim@xen.org \
    --cc=xen-devel@lists.xen.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).