Thread (32 messages) flat view 32 messages, 5 authors, 2015-07-03

Re: [PATCH v7 5/9] PCI: Add pci_iomap_wc() variants

From: Arnd Bergmann <arnd@arndb.de>
Date: 2015-06-25 20:53:12
Also in: linux-pci, lkml, xen-devel

On Thursday 25 June 2015 15:01:56 Casey Leedom wrote:
  Is there a reference I can read on this so I can understand
when and where we can use the __raw_*() APIs?  Can these
Raw Read/Write operations be reordered with respect to
each other or are the use of the various flavors of SYNC
instructions just to maintain order between Cached Memory
Accesses and I/O Instructions?
The interpretation is not consistent across architectures.

My best description would be that the __raw_*() accessors should
only be used for accessing RAM areas that are known to have no
side-effects and can be read in any size (8-bit to 64-bit wide),
any alignment, and do not have a specific endianess.

If you are dealing with MMIO registers that have a fixed endianess
and size, the correct accessor would be readl_relaxed(), which
is like readl() but lacks the barriers on certain architectures.

	Arnd
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help