From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Eddie Dawydiuk <eddie@embeddedarm.com>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: PPC PCI bus registers
Date: Thu, 17 Sep 2009 07:54:46 +1000 [thread overview]
Message-ID: <1253138086.8375.290.camel@pasglop> (raw)
In-Reply-To: <4AB13550.1070506@embeddedarm.com>
On Wed, 2009-09-16 at 11:58 -0700, Eddie Dawydiuk wrote:
> I'm not sure I understand. To clarify I have an FPGA connected via the
> PCI bus
> which implements several peripherals, I've implemented device drivers
> for.
> Currently I am calling ioremap() to get a virtual address
> corresponding to the
> PCI devices. Then I use ___raw_writeN / ___raw_readN for
> reading/writing data
> via the PCI bus to the FPGA registers. From looking at io.h I believe
> this
> method is safe with regard to out of order execution.
>
> "* ioremap is the standard one and provides non-cacheable guarded
> mappings
> * and can be hooked by the platform via ppc_md "
>
> Can you verify if my understanding is correct, or let me know if I
> need to add
> memory barriers?
>
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.
Cheers,
Ben.
next prev parent reply other threads:[~2009-09-16 21:54 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 [this message]
2009-09-16 22:11 ` Eddie Dawydiuk
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=1253138086.8375.290.camel@pasglop \
--to=benh@kernel.crashing.org \
--cc=eddie@embeddedarm.com \
--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).