vmalloc and DMA
I need to treat a large number of pages (about 128) as continuous. However, I need to DMA to that memory from a device. The device has a built-in scatter-gather feature, so I don't need to worry about whether the pages are physically contiguous. Looking through LXR revealed a function called vmalloc_32. My questions are these:
(1) Is vmalloc_32 going to stick around for a while?
(2) Is it appropriate to vmalloc_32(512<<10) and then grab the underlying addresses for DMA?
(3) If it *is* appropriate, what's the proper way to get to those underlying addresses? I saw a virt_to_page macro somewhere...
Signature · 3 lines
- Stevie-O Real Programmers use COPY CON PROGRAM.EXE
Quoted 1 line · Stevie-O
I need to treat a large number of pages (about 128) as continuous.
Continuous to whom ?
Quoted 4 lines
(2) Is it appropriate to
vmalloc_32(512<<10)and then grab the underlying addresses for DMA?
(3) If it *is* appropriate, what's the proper way to get to those underlying addresses? I saw avirt_to_pagemacro somewhere...
If you use the pci_alloc interfaces you'll get what you want except for them not being fake contiguous to the kernel. You can still make them contiguous to user space.