All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Patrick Palka <patrick@parcs.ath.cx>
Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
	x86@kernel.org, Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>,
	Pranith Kumar <bobby.prani@gmail.com>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Hans-Christian Egtvedt <egtvedt@samfundet.no>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Fix the x86 specializations of atomic_[set|clear]_mask
Date: Thu, 16 Oct 2014 22:24:10 +0200	[thread overview]
Message-ID: <20141016202410.GL7369@worktop.fdxtended.com> (raw)
In-Reply-To: <CA+C-WL-EKxA-oZ815vG9jau76BwQvAuL5WiuE-YvddgWPzt-Ew@mail.gmail.com>

On Thu, Oct 16, 2014 at 12:49:43PM -0400, Patrick Palka wrote:
> On Oct 16, 2014 4:02 AM, "Peter Zijlstra" <peterz@infradead.org> wrote:
> >
> > On Wed, Oct 15, 2014 at 04:38:01PM -0400, Patrick Palka wrote:
> > > This patch fixes a number of issues with these specializations:
> > >
> > >   1. The memory operand inside the asm specification is erroneously
> > >   declared read-only instead of read-write.
> > >
> > >   2. There is no reason to require the 1st operand of andl/orl to be
> > >   inside a register; the 1st operand could also be an immediate operand.
> > >   So change its specification from "r" to "ir".
> > >
> > >   3. Since addr is supposed to be an atomic_t *, the memory operand
> > >   should be addr->counter and not *addr.
> > >
> > >   4. These specializations should be inline functions instead of macros.
> > >
> > >   5. Finally, the "memory" clobbers are unnecessary, so they should be
> > >   removed.  (This is in line with the other atomic functions such as
> > >   atomic_add and atomic_sub, the likes of which do not have a "memory"
> > >   clobber.)
> >
> > No real problem with this, but I'm going to kill off these functions
> > when I get a little time :)
> 
> Hmm why's that?

because they're odd (inconsistent with the rest of the atomic
interfaces) and not implemented by all archs.

See: https://lkml.org/lkml/2014/2/6/196

3.18 will include up to 4/5 of that series and when I get a spare moment
I need cleanup/post the next arch sweep that will get us that 5/5 thing.



  parent reply	other threads:[~2014-10-16 20:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-15 20:38 [PATCH] Fix the x86 specializations of atomic_[set|clear]_mask Patrick Palka
2014-10-16  8:02 ` Peter Zijlstra
     [not found]   ` <CA+C-WL-EKxA-oZ815vG9jau76BwQvAuL5WiuE-YvddgWPzt-Ew@mail.gmail.com>
2014-10-16 20:24     ` Peter Zijlstra [this message]
2014-10-17  0:19       ` Patrick Palka

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=20141016202410.GL7369@worktop.fdxtended.com \
    --to=peterz@infradead.org \
    --cc=bobby.prani@gmail.com \
    --cc=egtvedt@samfundet.no \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=patrick@parcs.ath.cx \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=tglx@linutronix.de \
    --cc=x86@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.