From: Paul Mackerras <paulus@samba.org>
To: Mike Frysinger <vapier.adi@gmail.com>
Cc: benh@kernel.crashing.org, torvalds@linux-foundation.org,
akpm@linux-foundation.org, linuxppc-dev@ozlabs.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] lib: Provide generic atomic64_t implementation
Date: Fri, 19 Jun 2009 10:47:34 +1000 [thread overview]
Message-ID: <19002.57382.880505.913539@cargo.ozlabs.ibm.com> (raw)
In-Reply-To: <8bd0f97a0906181655jd68835fg10fe0783b6a6068d@mail.gmail.com>
Mike Frysinger writes:
> On Sat, Jun 13, 2009 at 03:10, Paul Mackerras wrote:
> > +typedef struct {
> > + long long counter;
> > +} atomic64_t;
>
> lack of volatile seems odd compared to:
> include/linux/types.h:
> typedef struct {
> volatile int counter;
> } atomic_t;
> -mike
It's only accessed under a spinlock, so I don't think it needs to be
volatile. On UP it's accessed within local_irq_save/restore which
should also be compiler barriers and prevent memory access reordering,
so again volatile isn't needed.
Paul.
next prev parent reply other threads:[~2009-06-19 0:48 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-13 7:10 Paul Mackerras
2009-06-13 20:13 ` Linus Torvalds
2009-06-13 20:25 ` Linus Torvalds
2009-06-13 20:56 ` Ingo Molnar
2009-06-14 11:53 ` Avi Kivity
2009-06-14 12:21 ` Paul Mackerras
2009-06-14 13:04 ` Avi Kivity
2009-06-15 2:44 ` Roland Dreier
2009-06-15 4:30 ` Paul Mackerras
2009-06-16 22:27 ` Gabriel Paubert
2009-06-13 21:53 ` Arnd Bergmann
2009-06-18 23:55 ` Mike Frysinger
2009-06-19 0:46 ` Benjamin Herrenschmidt
2009-06-19 0:47 ` Paul Mackerras [this message]
2009-06-19 0:49 ` Mike Frysinger
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=19002.57382.880505.913539@cargo.ozlabs.ibm.com \
--to=paulus@samba.org \
--cc=akpm@linux-foundation.org \
--cc=benh@kernel.crashing.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=torvalds@linux-foundation.org \
--cc=vapier.adi@gmail.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
all inboxes | Powered by JetHome®