Re: Alpha: virt_to_bus/GFP_DMA problem

Ingo Molnar (mingo@chiara.csoma.elte.hu)
Fri, 10 Dec 1999 16:01:17 +0100 (CET)


On Fri, 10 Dec 1999, Thomas Sailer wrote:

> The ESS Solo1 PCI sound chip only implements a 24bit BMDMA
> address register for recording. The driver basically does
> virt_to_bus(kmalloc(..,GFP_DMA)) to get its DMA buffer,
> however eg. Pyxis virt_to_bus
>
> __EXTERN_INLINE unsigned long pyxis_virt_to_bus(void * address)
> {
> return virt_to_phys(address) + PYXIS_DMA_WIN_BASE;
> }
>
> #define PYXIS_DMA_WIN_BASE (1UL*1024*1024*1024)
> #define PYXIS_DMA_WIN_SIZE (2UL*1024*1024*1024)
>
> makes it clear that the resulting address will never be
> below 16M. Currently, the driver panics (because
> it asked for memory whose bus address is below 16M,
> what the meaning of GFP_DMA is, but got something else).
> What should the driver do?

it's not clear i think from your description how the kmalloc()-ed GFP_DMA
buffer gets passed to the chip, exactly. [one small nitpick: to be
platform-independent, you should use virt_to_bus(vaddr)].

is kmalloc() returning a pointer that points to a <16MB page? Adding a few
printks to the driver could help ...

-- mingo

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