Alex Ivchenko <aivchenko@ueidaq.com> wrote:
> 4. Then one can translate kernel-space virtual address into physical
> one to supply to scater-gather BM-capable hardware.
>
> Is it any way to do this with Linux?
For 2.2.x kernels, look at the rvmalloc/rvfree functions in
linux/drivers/char/bttv.c I would recommend overriding your
driver's mmap method to allocate memory (via rvmalloc) that
can be used in both user and kernel space. As a bonus, such
allocated memory is usable in interrupt contexts. However, it
is NOT contiguous pages (since it's based off of vmalloc) and
can't be used for linear DMA (scatter-gather should work fine, though)
On 2.3.x kernels, I hear that the kiovec() routines are
the way to go for this kind of I/O, but I haven't tried them out
myself.
-- Jason McMullan, Senior Linux Consultant, Linuxcare, Inc. 412.422.8077 tel, 412.656.3519 cell, 415.701.0792 fax jmcmullan@linuxcare.com, http://www.linuxcare.com/ Linuxcare. Support for the revolution.- 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.tux.org/lkml/
This archive was generated by hypermail 2b29 : Tue May 23 2000 - 21:00:17 EST