linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Rutland <mark.rutland@arm.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>,
	linux-kernel@vger.kernel.org, Boqun Feng <boqun.feng@gmail.com>,
	Will Deacon <will.deacon@arm.com>, Jiri Slaby <jslaby@suse.com>,
	Peter Hurley <peter@hurleysoftware.com>
Subject: Re: [PATCH 1/7] atomics/tty: add missing atomic_long_t * cast
Date: Fri, 22 Jun 2018 17:55:59 +0100	[thread overview]
Message-ID: <20180622165535.w3jvdzc6aykkiq5m@lakrids.cambridge.arm.com> (raw)
In-Reply-To: <20180606140042.GA8865@kroah.com>

Hi,

On Wed, Jun 06, 2018 at 04:00:42PM +0200, Greg Kroah-Hartman wrote:
> On Tue, Jun 05, 2018 at 04:53:34PM +0200, Peter Zijlstra wrote:
> > On Tue, Jun 05, 2018 at 04:43:04PM +0200, Peter Zijlstra wrote:
> > 
> > > I can make a proper patch, hold on.
> > 
> > ---
> > Subject: atomic/tty: Fix up atomic abuse in ldsem
> > 
> > Mark found ldsem_cmpxchg() needed an (atomic_long_t *) cast to keep
> > working after making the atomic_long interface type safe.
> > 
> > Needing casts is bad form, which made me look at the code. There are no
> > ld_semaphore::count users outside of these functions so there is no
> > reason why it can not be an atomic_long_t in the first place, obviating
> > the need for this cast.
> > 
> > That also ensures the loads use atomic_long_read(), which implies (at
> > least) READ_ONCE() in order to guarantee single-copy-atomic loads.
> > 
> > When using atomic_long_try_cmpxchg() the ldsem_cmpxchg() wrapper gets
> > very thin (the only difference is not changing *old on success, which
> > most callers don't seem to care about).
> > 
> > So rework the whole thing to use atomic_long_t and its accessors
> > directly.
> > 
> > While there, fixup all the horrible comment styles.
> > 
> > Cc: Peter Hurley <peter@hurleysoftware.com>
> > Reported-by: Mark Rutland <mark.rutland@arm.com>
> > Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
> 
> Looks good, I'll queue this up after 4.18-rc1 is out, thanks.

Now that v4.18-rc1 is out, I thought I'd ping so that this doesn't get
forgotten.

Have a good weekend!

Mark.

  reply	other threads:[~2018-06-22 16:56 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-29 18:07 [PATCH 0/7] atomics: generate atomic headers Mark Rutland
2018-05-29 18:07 ` [PATCH 1/7] atomics/tty: add missing atomic_long_t * cast Mark Rutland
2018-05-29 18:35   ` Greg Kroah-Hartman
2018-06-05 12:00   ` Peter Zijlstra
2018-06-05 14:20     ` Greg Kroah-Hartman
2018-06-05 14:43       ` Peter Zijlstra
2018-06-05 14:53         ` Peter Zijlstra
2018-06-06 13:55           ` Mark Rutland
2018-06-06 14:00           ` Greg Kroah-Hartman
2018-06-22 16:55             ` Mark Rutland [this message]
2018-06-28 12:07               ` Greg Kroah-Hartman
2018-05-29 18:07 ` [PATCH 2/7] atomics/treewide: rework ordering barriers Mark Rutland
2018-06-05 12:16   ` Peter Zijlstra
2018-06-05 13:28     ` Mark Rutland
2018-06-05 13:56       ` Peter Zijlstra
2018-06-05 14:02         ` Mark Rutland
2018-06-05 14:15           ` Peter Zijlstra
2018-05-29 18:07 ` [PATCH 3/7] atomics: separate basic {cmp,}xchg() Mark Rutland
2018-05-29 18:07 ` [PATCH 4/7] atomics: add common header generation files Mark Rutland
2018-06-05 12:25   ` Peter Zijlstra
2018-06-05 12:52     ` Mark Rutland
2018-05-29 18:07 ` [PATCH 5/7] atomics: switch to generated fallbacks Mark Rutland
2018-05-29 18:07 ` [PATCH 6/7] atomics: switch to generated atomic-long Mark Rutland
2018-05-29 18:07 ` [PATCH 7/7] atomics: switch to generated instrumentation Mark Rutland
2018-06-04 16:21 ` [PATCH 0/7] atomics: generate atomic headers Dmitry Vyukov
2018-06-05  5:56   ` Mark Rutland
2018-06-05 13:31   ` Peter Zijlstra
2018-06-05 13:29 ` Peter Zijlstra
2018-06-05 13:58   ` Mark Rutland
2018-06-05 14:14     ` Peter Zijlstra
2018-06-05 14:23       ` Mark Rutland

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=20180622165535.w3jvdzc6aykkiq5m@lakrids.cambridge.arm.com \
    --to=mark.rutland@arm.com \
    --cc=boqun.feng@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peter@hurleysoftware.com \
    --cc=peterz@infradead.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).