Re: DMA to/from user buffers

From: Helge Hafting (helgehaf@idb.hist.no)
Date: Wed Sep 05 2001 - 02:51:22 EST


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/



This archive was generated by hypermail 2b29 : Fri Sep 07 2001 - 21:00:30 EST