[lkml]   [2005]   [Mar]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: User mode drivers: part 2: PCI device handling (patch 1/2 for 2.6.11)
On Llu, 2005-03-14 at 00:13, Peter Chubb wrote:
> Greg> see mmap(2)
> mmap maps a file's contents into your own virtual memory.
> usr_pci_map maps part of your own virtual memory into pci bus space
> for a particular device (using the IOMMU if your machine has one), and
> returns a scatterlist of bus addresses to hand to the device.

You can't really do it that way around because you don't know what the
memory constraints of the device are compared to your user pages.
Suppose your user pages are in high memory over 4GB and the device is
32bit DMA constrained ? You don't want bounce buffers clearly.

In addition you have to be very careful about shared pages when doing
DMA because you don't want to DMA into a COW page but that is handleable
(as is done by O_DIRECT)


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:11    [W:0.112 / U:1.172 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site