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

From: Jeff Garzik
Date: Sun Mar 21 2004 - 18:24:17 EST


Linus Torvalds wrote:
In fact, on a lot of architectures (well, at least x86, and likely
anything else that doesn't use any IOTLB and just allocates a chunk of
physical memory), I think the "map_dma_coherent()" thing should basically
just become a "remap_page_range()". Ie something like

#define map_dma_coherent(vma, vaddr, len) \
remap_page_range(vma, vma->vm_start, __pa(vaddr), len, vma->vm_page_prot)

for the simple case.


That would be nice, though the reason I avoided remap_page_range() in via82cxxx_audio is that it discourages S/G. Because remap_page_range() is easier and more portable, several drivers allocate one-big-area and then create an S/G list describing individual portions of that area.

I want to avoid that. Most decent h/w is s/g these days.

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/