[RFC] mmaping with VIVT cache

Russell King - ARM Linux linux at arm.linux.org.uk
Mon Sep 20 06:50:19 EDT 2010


On Mon, Sep 20, 2010 at 11:38:44AM +0100, Pawel Moll wrote:
> > However, in this case, architectures using VIPT aliasing caches will
> > also trip over it - has anyone used this webcam on something like
> > Sparc or powerpc?  I'm guessing that it'll fail there too...
> 
> It wasn't a webcam but USB audio card, not sparc nor powerpc but sh but
> the I believe problem stays the same - vmalloc-ed buffer mapped into the
> user-space...
> 
> http://thread.gmane.org/gmane.linux.alsa.devel/55882/focus=7160
> 
> I've ended up with pgprot_noncached(), as there was no "alias-safe API"
> available, and apparently it's still the case? ;-)

pgprot_noncached will be unsafe on ARMv6 and ARMv7 architectures when
used for mapping existing memory, as you'll be violating an architectural
restriction (having aliasing mappings of memory as 'Strongly ordered'
when there is a pre-existing 'Memory' type mapping.)



More information about the linux-arm-kernel mailing list