[Top] [All Lists]

Re: Uncached mmap

To: Mile Davidovic <>
Subject: Re: Uncached mmap
From: Ralf Baechle <>
Date: Mon, 13 Nov 2006 12:32:33 +0000
In-reply-to: <001201c70704$bc731230$>
Original-recipient: rfc822;
References: <001201c70704$bc731230$>
User-agent: Mutt/
On Mon, Nov 13, 2006 at 10:18:52AM +0100, Mile Davidovic wrote:

> Hello to all,
> I am working on fb device and I have general questions regarding cache/uncache
> access to MIPS memory. 
> User space application use mmap access for r/w access to fb device. If fb use
> cached memory, user space application has to call cacheflush to flush contents
> instruction and/or data cache. In this case there are no limitations regarding
> byte access to this memory. Is this correct statement?


With caching bus transfers from and to the device happen at the full width
of the bus, so a device won't see byte accesses ever.

> If fb use uncached memory, there is no need for cacheflush call in user space
> application but limitation is access to mmap uncached memory.


> There is no byte access to uncached mmaped memory. Is this correct statement?

Definately wrong.  For example alot of mmapped I/O devices use uncached
byte accesses.

This stament if of course limited to the CPU's part of the system.  Devices
may have their specific restrictions on access size and its not uncommon to
have such restrictions though that would seem unlikely for framebuffer

If your particular CPU support it you may want to use cache mode "uncached
accellerated" for a framebuffer.  It should deliver significtn performance
gains yet avoid the need for cache flushes.


<Prev in Thread] Current Thread [Next in Thread>