linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Eddie Dawydiuk <eddie@embeddedarm.com>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: PPC PCI bus registers
Date: Wed, 16 Sep 2009 15:11:30 -0700	[thread overview]
Message-ID: <4AB16292.9020704@embeddedarm.com> (raw)
In-Reply-To: <1253138086.8375.290.camel@pasglop>

Benjamin,

> Out of order execution != out of order storage. ioremap() will give you
> guarded space which means it cannot be speculatively accessed for
> example, and you do get -some- guarantees but not that your stores are
> going to hit the device in order, nor that your loads are going to be
> performed until the CPU actually use the result of the load, which can
> be delayed beyond a store.

Interesting. So IIUC if I were to use ioremap and then bit bang bus cycles using 
readN() / writeN() I would need to add memory barrier to ensure the order of the 
load and store operations does not change. Is my understanding correct? If so 
what are the recommended macros/functions for adding memory barriers, or are 
there preferred functions to use in place of ioremap() and readN()/writeN?

PS I've looked in Documentation/ in the 2.6.30 Linux kernel tree for more 
information, but I was unable to find any. If there are any example drivers or 
documentation that you know of on this topic I'd be quite interested if you 
could point me to it.

Thanks for your patience and time you've been quite helpful.

-- 
Best Regards,
________________________________________________________________
  Eddie Dawydiuk, Technologic Systems | voice:  (480) 837-5200
  16525 East Laser Drive              | fax:    (480) 837-5300
  Fountain Hills, AZ 85268            | web: www.embeddedARM.com

  reply	other threads:[~2009-09-16 22:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-02 23:44 PPC PCI bus registers Eddie Dawydiuk
2009-09-02 23:56 ` Grant Likely
2009-09-03 10:00 ` Benjamin Herrenschmidt
2009-09-16 18:58   ` Eddie Dawydiuk
2009-09-16 21:54     ` Benjamin Herrenschmidt
2009-09-16 22:11       ` Eddie Dawydiuk [this message]
2009-09-17  1:24         ` Benjamin Herrenschmidt
2009-09-17 16:11           ` Eddie Dawydiuk

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=4AB16292.9020704@embeddedarm.com \
    --to=eddie@embeddedarm.com \
    --cc=benh@kernel.crashing.org \
    --cc=linuxppc-dev@ozlabs.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;
as well as URLs for NNTP newsgroup(s).