[PATCH] Use Normal uncached memory rather than Strongly Ordered on ARMv6+

Russell King - ARM Linux linux at arm.linux.org.uk
Fri Oct 23 17:37:24 EDT 2009


On Fri, Oct 23, 2009 at 02:30:31PM -0700, David Brown wrote:
> On Fri, Oct 23, 2009 at 05:36:00AM -0700, Russell King - ARM Linux wrote:
> 
> > > Alternatively, we can place a DMB in readl/writel but I'm not sure about
> > > the performance impact.
> > 
> > If you do that, you might as well use strongly ordered memory for device
> > mappings - since you'll be causing the CPU to stall after each access.
> 
> Actually, the DMB is stronger than strongly ordered.  Strongly
> ordered only guarantees ordering within somewhat arbitrarily
> defined (and not completely settled) 1KB boundaries, for memory
> mapped peripherals.

I don't believe so for ARMv6 and below.  The ARMv6 ARM (DDI0100I) is
quite explicit about the ordering there and contains no such exception
(I checked tonight).  See B2.5, figure B2-1 and its associated text.

ARMv7 is a different kettle of fish, where memory accesses are completely
unordered with respect to any other kind of access.



More information about the linux-arm-kernel mailing list