[parisc-linux] EISA 100/10 add-on card causes kernel BUG

Grant Grundler grundler@dsl2.external.hp.com
Sun, 17 Mar 2002 09:59:04 -0700


Matthew Wilcox wrote:
> My understanding is that DMA to userspace is to pages in the page cache
> only.

NICs use the page cache? or just for ZC?
block IO certainly uses the page cache.

> As such, the normal mechanisms for dcache coherency should be used.
> That is, DMA to a kernel view of the page and call flush_dcache_page
> after touching it.

For page cache, ok. Then ccio/sba implicitly use whatever SR the
kernel is supposed to use and we don't need to pass the parameter.
If NIC's use page cache for ZC, that would make life simple.

> My proposed scheme for kmap/kunmap implementation
> would make flush_dcache_page a no-op, since the kernel would have a view
> of the page which is automatically cache coherent with userspace's view.

I'm liking that idea alot.
I've really never been comfortable with the two views not being coherent
since it will expose more kernel bugs that other arches don't see.


thanks,
grant