lkml.org 
[lkml]   [2001]   [Sep]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: DMA to/from user buffers
Sebastian Heidl wrote:
>
> Hi,
>
> two questions about using an user-supplied buffer (e.g. malloced
> in user space) for DMA transfers:
>
> 1. Is it possible ?
> 2. What restrictions/requirements apply for the buffer (alignment...) ?

There are some obvious problems with this. First, a malloc'ed
buffer might not be in memory. It might not be created yet if you
haven't touched it, and it might be on swap if you have.

The recommended way is to allocate in the kernel, (probably by
the driver that want to do DMA), and mmap this buffer into
userspace.

Helge Hafting
-
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:02    [W:0.049 / U:0.660 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site