[prev in list] [next in list] [prev in thread] [next in thread]
List: kiobuf-io-devel
Subject: Re: [Kiobuf-io-devel] DMAing to/from user space
From: Jochen Strohbeck <strohbeck () gmx ! net>
Date: 2001-03-02 16:34:28
[Download RAW message or body]
"Stephen C. Tweedie" wrote:
> What driver? kiobufs are just data containers. The raw.c driver _is_
> a device driver which uses kiobufs.
Basically what I need:
'the application':
- allocate buffer ('malloc()')
- tell the driver about that buffer
- tell the driver to start dma xfer
- ...
'the driver':
- lock this buffer
- find out everything about this buffer (start addr, no pages, ...)
to build scatter/gather table for dma controller
- start dma
- tell the application that dma has finished
- ...
I'm purely guessing what these functions are used for in raw.c
(BTW: Is this code used to access raw block devices ? I always thought
that there was no way to bypass the disk cache in 2.2.x kernels ! But
now it's too late ...)
err = alloc_kiovec(1, &iobuf);
-> alloc kiobuf(s) ?
err = map_user_kiobuf(rw, iobuf, (unsigned long) buf, iosize);
-> lock buf(fer) ?
err = brw_kiovec(rw, 1, &iobuf, dev, b, sector_size);
-> copy data ?
unmap_kiobuf(iobuf);
-> unlock buf(fer) ?
free_kiovec(1, &iobuf);
-> free kiobuf(s) ?
How can I find out the physical (bus) address(es) of the xfer buffer to
build dma lists for scatter/gather ?
Please tell me if I'm in the wrong show ...
Jochen
_______________________________________________
Kiobuf-io-devel mailing list
Kiobuf-io-devel@lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/kiobuf-io-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic