Re: Mapping non-prefetchable memory

Stephen Williams (steve@icarus.icarus.com)
Wed, 26 Mar 1997 16:33:55 -0800


rdubey@cisco.com said:
> Also, just to confirm this, in 2.0.x world kmalloc() returns
> contiguous, same phy as virt, locked, non-cached memory -- right?

# include <asm/io.h>

and use virt_to_phys() and phys_to_virt()
or virt_to_bus() and bus_to_virt()

The virt_to_bus() output is the stuff you shove into the DMA controllers
of your PCI device, and bus_to_virt() to convert the (masked) BAR values
to virtual addresses.

-- 
Steve Williams
steve@icarus.com
steve@picturel.com

"The woods are lovely, dark and deep. But I have promises to keep, And lines to code before I sleep, And lines to code before I sleep."