[RFC/PATCH] map drivers. DCACHE option for physmap and mphysmap drivers
Nicolas Pitre
nico at cam.org
Fri Jan 27 15:47:54 EST 2006
On Fri, 27 Jan 2006, Josh Boyer wrote:
> On 1/27/06, Jared Hulbert <jaredeh at gmail.com> wrote:
> > When I first did a patch like this I used a very platform dependent
> > embedded assembly loop to _invalidate_ NOT _flush_ the specific
> > cachelines possibly affected by the flash program or erase.
>
> Yep, that would be better.
No it wouldn't. It would quickly become crufty and unreadable as more
architectures add their stuff.
Also note that some architectures might have issues having two virtual
areas mapped to the same physical area (like i386 if I remember
correctly). In that case the only way to have a cached mapping is to
rely on the fact that the flash chip is likely to have aliases in the
memory map and use one of them for the cached mapping. Those tricks are
really platform dependent and better expressed in a platform specific
map driver.
Nicolas
More information about the linux-mtd
mailing list