From: Kyle McMartin <kyle@mcmartin.ca>
To: Matthew Wilcox <matthew@wil.cx>
Cc: Kyle McMartin <kyle@mcmartin.ca>, linux-parisc@vger.kernel.org
Subject: Re: parisc: add barriers to mmio accessors
Date: Tue, 3 Jun 2008 10:29:25 -0400 [thread overview]
Message-ID: <20080603142925.GB31771@phobos.i.cabal.ca> (raw)
In-Reply-To: <20080603124229.GA8434@parisc-linux.org>
On Tue, Jun 03, 2008 at 06:42:29AM -0600, Matthew Wilcox wrote:
> Are you sure this is correct? Seems to me it should be:
>
> q = ((unsigned long long)q_hi << 32) | q_lo;
>
> I would have thought GCC would complain about a shift exceeding the
> width of the type.
>
I probably fat fingered the braces.
> A third thing is that you're doing this to the __raw_ variants which
> don't have to be serialised. How about we keep the current definitions of
> __raw_readX/__raw_writeX, define the regular readX/writeX to be the inline
> assembler you've just posted, and add new defines of __readX/__writeX
> as byteswapping versions of __raw_readX/__raw_writeX?
>
I was just going to define them all in terms of this... since, well,
performance is mostly irrelevant.
> [For those who aren't on linux-arch, there's just been a long thread
> about the semantics of the different accessors and the above reflects my
> understanding of that thread.]
>
> Should we add memory clobbers to gsc_readX/gsc_writeX?
>
Yeah, I think so (although, I really hope GCC won't reorder serializing
instructions like rsm/ssm. ;-)
prev parent reply other threads:[~2008-06-03 14:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-03 5:42 parisc: add barriers to mmio accessors Kyle McMartin
2008-06-03 12:22 ` Carlos O'Donell
2008-06-03 12:23 ` Carlos O'Donell
2008-06-03 12:42 ` Matthew Wilcox
2008-06-03 14:29 ` Kyle McMartin [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=20080603142925.GB31771@phobos.i.cabal.ca \
--to=kyle@mcmartin.ca \
--cc=linux-parisc@vger.kernel.org \
--cc=matthew@wil.cx \
/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