[lkml]   [2004]   [Mar]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: can device drivers return non-ram via vm_ops->nopage?
Linus Torvalds wrote:
> On Sun, 21 Mar 2004, Jeff Garzik wrote:
>>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.
> Note that there is really two different kinds of IO memory:
> - real IO-mapped memory on the other side of a bus
> - real RAM which is on the CPU side of the bus, but that has additionally
> been "mapped" some way as to be visible from devices.

Yes. via audio example is DMA (second kind), and an fbdev driver would
need to worry about the first kind (MMIO).

For the second kind, your solution (snipped) seems sane, though I wonder
where dma_unmap_to_page() is called.

For the first kind, please read fb_mmap in drivers/video/fbmem.c. Look
at the _horror_ of ifdefs in exporting the framebuffer. And that horror
is what's often needed when letting userspace mmap(2) PCI memory IO regions.

So, an mmio_map() in addition to dma_map*?


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 14:01    [W:0.084 / U:2.864 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site