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

From: Jeff Garzik
Date: Sun Mar 21 2004 - 18:12:41 EST


Russell King wrote:
I don't think this addresses the scatter-gather case I mentioned above.
Or if we are, we've rewritten ALSA before hand to use Linux scatterlists
along side several dma_alloc_coherent mappings and have the ability to
mmap these as well.

Remember that we're fond of telling driver writers to use scatter gather
lists rather than grabbing one large contiguous memory chunk... So
they did exactly as we told them. Using pci_alloc_consistent and/or
dma_alloc_coherent and built their own scatter lists.

Agreed... though IMO that can handled by considering DMA S/G as just one more set of helper functions that the driver writer should not have to implement ;) dma_sg_setup_mmap() could function as a peer alongside dma_setup_mmap(), mmio_setup_mmap(), etc. Providing such to driver writers gives them incentive to use S/G lists as well as incentive not to invent their own mmap(2) setup and handling code.

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/