lkml.org 
[lkml]   [2003]   [May]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: How to DMA data from a pci device to a user buffer directly
> 5) My DMA controller has unlimited scatter-gather capability.

> By the way, I have tested the rest of my code by DMA the image data to a
> kernel buffer allocated using kmalloc() first, then do a memcpy() to copy
> the image data to a user buffer. This alternative seems to work fine.

Use mmap to make the kmalloc-ed buffer available to user
application without the overhead of memcpy().

It is very wonderful that you can do s/g, so on the next stage
you can kmalloc a bunch of blocks with small order (1) and use
those instead of relying on bootmem allocation and Pauline's
bigphysarea patch. Most older controllers cannot do it.

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

\
 
 \ /
  Last update: 2005-03-22 13:35    [W:0.036 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site