Re: When is a kernel VA not a virt_to_xxx() address?

Jeff Garzik (jgarzik@mandrakesoft.com)
Mon, 13 Dec 1999 18:54:38 -0500


Bret Indrelee wrote:
>
> Hello,
>
> I'm having some problems setting up a DMA between a PCI device and kernel
> memory space. I haven't fully debugged it, but one of the areas that looks
> suspicious is obtaining the PCI address of a kernel buffer.
>
> I've allocated a buffer in kernel space using vmalloc(). I had originally
> thought that I could just do a virt_to_bus() in order to get the PCI address
> of the buffer. Looking through various other drivers, I'm seeing them go
> through the pgd/pmd/pte before calling virt_to_bus().

Bret,

Check out how the latest bttv and Zoran drivers use vmalloc. grep for
vmalloc in drivers/char.

-- 
Jeff Garzik              | Just once, I wish we would encounter
Building 1024            | an alien menace that wasn't immune to
MandrakeSoft, Inc.       | bullets.   -- The Brigadier, "Dr. Who"

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