[parisc-linux] Fwd: Problems with raw interface.

David S. Miller davem@redhat.com
Fri, 26 Sep 2003 06:21:43 -0700


On Fri, 26 Sep 2003 14:29:01 +0100
Matthew Wilcox <willy@debian.org> wrote:

> On Fri, Sep 26, 2003 at 05:56:52AM -0700, David S. Miller wrote:
> > When page->mapping is NULL, flush_dcache_page() should purge the page
> > (by physical addres) from it's caches.  This is what sparc64 does.
> 
> But you can't do that on PA-RISC.  You can only purge virtual addresses.

Then for page->mapping == NULL your flush_dcache_page() is not doing
what it is supposed to, and you can expect problems extending further
than this raw I/O case.

You have to find a way to walk all the address spaces to figure out
where the page is mapped.

If you just put a flush_cache_range() there, you may get your current
test working but that code is wrong.  It will be wrong in any case
where the page is mapped to anywhere other then this mapping in
this address space.

The real problem for you guys is that in 2.4.x there is no easy way to
go from a page to it's mapping regardless of what kind of page it is.
That's what you need to rectify somehow.