[RFC/PATCH] map drivers. DCACHE option for physmap and mphysmap drivers

Nicolas Pitre nico at cam.org
Fri Jan 27 15:39:59 EST 2006

On Fri, 27 Jan 2006, Jared Hulbert wrote:

> Flushing the caches back _could_ be a very bad thing, it could cause
> flash to do many bad things because you would be write arbitrary data
> back to the flash bus.  I'm not sure why it would machine check.  If
> your processor was configured properly I'm not sure why flushing would
> trigger burst writes to a memory not capable of bursting, but then
> hardware can have its mysterious ways.  Either way you would likely do
> bad things to the flash by flushing garbage back to it.  However, from
> a higher level look at it you should never be writing directly to the
> cached mapping of flash as only the mtd really knows about it and only
> uses it read.  Therefore the cachelines are always clean and don't get
> written back so it's not really a problem.

And this is _VERY_ fundamental.  That cached memory must _never_ be 
written to.  In fact, the memory protection could be set read-only as 
well for such mapping.  Hence it must never be written back.


More information about the linux-mtd mailing list