<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Russell King - ARM Linux wrote:
<blockquote cite="mid:20110107091720.GM31708@n2100.arm.linux.org.uk"
 type="cite">
  <pre wrap="">On Fri, Jan 07, 2011 at 10:26:25AM +0800, stanley.miao wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">Viresh Kumar wrote:
    </pre>
    <blockquote type="cite">
      <pre wrap="">readl also calls outer cache maintainance operations 
      </pre>
    </blockquote>
    <pre wrap="">I use readl here on spear13xx. It works fine.
This is the definition of readl, could you tell me which code calls  
outer cache maintainance ?

#define readl(c) ({ __u32 __v = le32_to_cpu((__force __le32) \
                                       __raw_readl(__mem_pci(c))); __v; })
    </pre>
  </blockquote>
  <pre wrap=""><!---->
#define readl(c)                ({ u32 __v = readl_relaxed(c); __iormb(); __v; })

is how it's now defined, and __iormb() is defined to be rmb() on ARMv7+,
which translates to a dmb.

writel() on the other hand is less straight forward.  It uses __iowmb()
which translates to a wmb() on ARMv7+, which is a dsb and an outer cache
sync operation.  This will fail in the decompressor code as there's no
outer cache support there.

  </pre>
</blockquote>
Hi, Russell, Thanks for your patient explanation. <br>
<br>
With this in mind, I think readl_relaxed() should be better here.<br>
<br>
Stanley.<br>
<br>
</body>
</html>