[lkml]   [1997]   [Mar]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Mapping non-prefetchable memory
From 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

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

 \ /
  Last update: 2005-03-22 13:39    [W:0.060 / U:0.868 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site