Re: Alpha: virt_to_bus/GFP_DMA problem

Jes Sorensen (Jes.Sorensen@cern.ch)
10 Dec 1999 13:31:27 +0100


>>>>> "Thomas" == Thomas Sailer <sailer@ife.ee.ethz.ch> writes:

Thomas> __EXTERN_INLINE unsigned long pyxis_virt_to_bus(void *
Thomas> address) { return virt_to_phys(address) + PYXIS_DMA_WIN_BASE;
Thomas> }

Thomas> #define PYXIS_DMA_WIN_BASE (1UL*1024*1024*1024) #define
Thomas> PYXIS_DMA_WIN_SIZE (2UL*1024*1024*1024)

Thomas> makes it clear that the resulting address will never be below
Thomas> 16M. Currently, the driver panics (because it asked for memory
Thomas> whose bus address is below 16M, what the meaning of GFP_DMA
Thomas> is, but got something else). What should the driver do?

I take it that Pyxis is a type of Alpha box?

What virt_to_bus() does is to convert the virtual address to an
address as seen from the PCI bus. The way I read the above code it
means that memory in the Pyxis box as seen from the PCI bus will
always be above the 1GB limit. In this case it simply means that you
are out of luck, yet another broken PCI device, and the driver should
simply print a warning and exit, without panicing the box.

Time to moan at the people who did the ESS Solo1 and ask them to
replace the card with one that is PCI 2.x compliant ;-)

Jes

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