mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* vmalloc and DMA
@ 2003-09-19  1:54 Stevie-O
  2003-09-19  9:05 ` Alan Cox
  0 siblings, 1 reply; 2+ messages in thread
From: Stevie-O @ 2003-09-19  1:54 UTC (permalink / raw)
  To: linux-kernel

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...


-- 
- Stevie-O

Real Programmers use COPY CON PROGRAM.EXE



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: vmalloc and DMA
  2003-09-19  1:54 vmalloc and DMA Stevie-O
@ 2003-09-19  9:05 ` Alan Cox
  0 siblings, 0 replies; 2+ messages in thread
From: Alan Cox @ 2003-09-19  9:05 UTC (permalink / raw)
  To: Stevie-O; +Cc: Linux Kernel Mailing List

On Gwe, 2003-09-19 at 02:54, Stevie-O wrote:
> I need to treat a large number of pages (about 128) as continuous. 

Continuous to whom ?

> (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...

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.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-09-19  9:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-19  1:54 vmalloc and DMA Stevie-O
2003-09-19  9:05 ` Alan Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®