From: Michael Buesch <mb@bu3sch•de>
To: Jeff Garzik <jeff@garzik•org>
Cc: Roland Dreier <rdreier@cisco•com>,
Andi Kleen <andi@firstfloor•org>,
ggrundstrom@neteffect•com, ewg@lists•openfabrics.org,
netdev@vger•kernel.org
Subject: Re: [PATCH 2/14] nes: device structures and defines
Date: Wed, 8 Aug 2007 18:43:36 +0200 [thread overview]
Message-ID: <200708081843.36370.mb@bu3sch.de> (raw)
In-Reply-To: <46B9F054.4030000@garzik.org>
On Wednesday 08 August 2007 18:33:24 Jeff Garzik wrote:
> Michael Buesch wrote:
> > On Wednesday 08 August 2007 18:18:31 Roland Dreier wrote:
> >> > But there are indeed a few cases that look wrong.
> >>
> >> yes...
> >>
> >> > arch/x86_64/kernel/pci-calgary.c: writel(cpu_to_be32(val), target);
> >>
> >> eg this almost certainly wants to be
> >>
> >> writel(swab32(val), target);
> >>
> >> or something equivalent like
> >>
> >> __raw_writel(cpu_to_be32(val), target);
> >> /* plus some suffficent memory ordering */
> >>
> >> - R.
> >>
> >>
> >
> > certainly, yes.
> > Most likely the __raw_writel variant is portable, but I am not
> > sure. Anybody sure?
>
> Yes, it's portable. You must however be aware of the guarantees that
> writel() provides and __raw_writel() does not: no barriers or flushes,
> no endian conversions, no ordering constraints, ... Probably a few more
> details I'm forgetting too :)
writel doesn't guarantee flushing either.
readl does.
The barrier/ordering issue however might be a critical thing,
when using __raw_XXX. So one must always mmiowb() after such a write.
--
Greetings Michael.
next prev parent reply other threads:[~2007-08-08 16:44 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-08 0:45 [PATCH 2/14] nes: device structures and defines ggrundstrom
2007-08-08 1:13 ` Jeff Garzik
2007-08-08 12:38 ` Andi Kleen
2007-08-08 11:50 ` Michael Buesch
2007-08-08 12:55 ` Andi Kleen
2007-08-08 13:02 ` Michael Buesch
2007-08-08 13:08 ` Andi Kleen
2007-08-08 13:28 ` Michael Buesch
2007-08-08 13:38 ` Andi Kleen
2007-08-08 13:48 ` Michael Buesch
2007-08-08 13:55 ` Michael Buesch
2007-08-08 16:18 ` Roland Dreier
2007-08-08 16:25 ` Jeff Garzik
2007-08-08 16:30 ` Michael Buesch
2007-08-08 16:33 ` Jeff Garzik
2007-08-08 16:43 ` Michael Buesch [this message]
2007-08-08 16:46 ` Roland Dreier
2007-08-08 16:57 ` akepner
2007-08-08 16:59 ` Jeff Garzik
2007-08-08 17:34 ` Michael Buesch
2007-08-08 19:40 ` Jeff Garzik
2007-08-08 16:39 ` Roland Dreier
2007-08-08 16:19 ` Jeff Garzik
2007-08-08 22:04 ` David Miller
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=200708081843.36370.mb@bu3sch.de \
--to=mb@bu3sch$(echo .)de \
--cc=andi@firstfloor$(echo .)org \
--cc=ewg@lists$(echo .)openfabrics.org \
--cc=ggrundstrom@neteffect$(echo .)com \
--cc=jeff@garzik$(echo .)org \
--cc=netdev@vger$(echo .)kernel.org \
--cc=rdreier@cisco$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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