Missing cache flush.

David S. Miller davem at redhat.com
Tue Jun 5 04:50:50 EDT 2001


David Woodhouse writes:
 > What I want is a function like simon_says_flush_page_to_ram(). In
 > this case, I _do_ know better than the CPU. It is _not_ coherent
 > with these devices.

One way to do this, (even portably :-) is via displacement flushes.
Linus mentioned this.

Basically if you know the L2 cache size and the assosciativity you can
do this as long as you can get a "2 * L2 cache size * assosciativity"
piece of contiguous physical memory.  When you need this "simon says"
flush, you basically read this physical memory span and this will
guarentee that all dirty data has exited the L2 cache.

Later,
David S. Miller
davem at redhat.com




More information about the linux-mtd mailing list