From: Will Deacon <will.deacon@arm.com>
To: Peter Hurley <peter@hurleysoftware.com>
Cc: Davidlohr Bueso <davidlohr@hp.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"rkuo@codeaurora.org" <rkuo@codeaurora.org>,
"arnd@arndb.de" <arnd@arndb.de>,
"paulus@samba.org" <paulus@samba.org>
Subject: Re: [PATCH 1/2] asm-generic: rwsem: ensure sem->cnt is only accessed via atomic_long_*
Date: Fri, 28 Feb 2014 15:41:22 +0000 [thread overview]
Message-ID: <20140228154121.GC29546@mudshark.cambridge.arm.com> (raw)
In-Reply-To: <531085FE.2050902@hurleysoftware.com>
On Fri, Feb 28, 2014 at 12:50:06PM +0000, Peter Hurley wrote:
> On 02/28/2014 07:13 AM, Will Deacon wrote:
> > diff --git a/include/asm-generic/rwsem.h b/include/asm-generic/rwsem.h
> > index 603a0a11e592..2b6401f9e428 100644
> > --- a/include/asm-generic/rwsem.h
> > +++ b/include/asm-generic/rwsem.h
> > @@ -40,14 +40,16 @@ static inline void __down_read(struct rw_semaphore *sem)
> > static inline int __down_read_trylock(struct rw_semaphore *sem)
> > {
> > long tmp;
> > + atomic_long_t *cnt = (atomic_long_t *)&sem->count;
>
> The shared rwsem failure paths (kernel/locking/rwsem_xadd.c) peek at
> sem->count as long type, so this isn't really necessary.
Yeah, none of this patch is necessary from a technical perspective. I was
just in the area and tried to make the file at least self-consistent wrt the
atomic API. It's a harmless cleanup.
Will
prev parent reply other threads:[~2014-02-28 15:41 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-21 17:22 Will Deacon
2014-02-21 17:22 ` [PATCH 2/2] asm-generic: rwsem: de-PPCify rwsem.h Will Deacon
2014-02-26 18:05 ` rkuo
2014-02-27 5:28 ` [PATCH 1/2] asm-generic: rwsem: ensure sem->cnt is only accessed via atomic_long_* Davidlohr Bueso
2014-02-27 18:53 ` Will Deacon
2014-02-28 12:13 ` Will Deacon
2014-02-28 12:50 ` Peter Hurley
2014-02-28 15:41 ` Will Deacon [this message]
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=20140228154121.GC29546@mudshark.cambridge.arm.com \
--to=will.deacon@arm.com \
--cc=arnd@arndb.de \
--cc=davidlohr@hp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=paulus@samba.org \
--cc=peter@hurleysoftware.com \
--cc=rkuo@codeaurora.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
Powered by JetHome