Re: can device drivers return non-ram via vm_ops->nopage?

From: Jeff Garzik
Date: Sun Mar 21 2004 - 18:10:44 EST


David Woodhouse wrote:
On Sun, 2004-03-21 at 17:34 -0500, Jeff Garzik wrote:

Tell driver writers to call a standard platform function with a {dma|mmio|pio|vmalloc} handle+size+len for {dma|mmio|pio|vmalloc} mmap setup, and {fault|nopage} handler. ;-) IMO they shouldn't have to care about the details.


Don't let drivers see the {fault|nopage} handler. On most arches it can
probably continue to be nopage(); other arches may use the
newly-proposed fault() or perhaps just put all the PTEs in place up
front. The driver shouldn't be given an opportunity to care.

If that's possible within the MM APIs... certainly. Have a standard struct vm_operations_struct for dma, dma s/g, mmio, ... I presume?

Jeff



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/