Re: mmap_dma() for user space code?

Jamie Lokier (lkd@tantalophile.demon.co.uk)
Wed, 15 Jul 1998 14:38:57 +0100


> I asked a couple of questions about this on the linux newsgroups, and
> people pointed me at this mailing list and a specific thread about
> this a while back and Linus was talking about implementing an
> mmap_dma() system call. This particular system calls sounds like
> exactly what I need to solve our problem, so my question is what was
> the outcome of this, and has such as system call been added to the
> latest 2.1.x kernel source tree?

No, not Linus' version anyway.

> If not, what do we need to do in order to get it implemented? I would
> really like to see this system call become a standard feature of 2.2
> so that our code can work out of the box with Linux 2.2 systems.

It could be implemented as a device driver, with an ioctl to return a
region (or regions if you can do scatter-gather), and their bus
addresses. I know this is possible, I have a custom network driver that
does something similar (returning a DMA buffer to user space), though
the bus address remains known only to the device driver in this case.

That would be possible in 2.2, if it is a completely separate device.

Ooh, I'm getting some thoughts now...

How about a generic user-space I/O device, that can take bulk mixed I/O
and DMA requests, provide user space DMA buffers (flagging them as
non-DMA if the operation would require bounce buffers), and can register
a bulk request for when the device is closed, for cleaning up a video
device to name but one example.. {:-)}

In other words a little language interpreter for I/O operations.

-- Jamie

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html