how to get virtual address from dma address
All programmers
I am relatively new to linux kernel. Please advise what is the safe way to get the original virtaul address from dma address e.g.,
dma_addr = pci_map_single(dev, vaddr, sizeof(struct some), PCI_DMA_BIDIRECTIONAL);
issue_command_to_the_controller();
my_isr()
{
struct some *some;
dma_addr = this_address_completed();--->some = how_to_get_from_dma_addr(dma_addr);
}
Would ioremap work.
TIA
__________________________________________________
Do You Yahoo!?
Listen to your Yahoo! Mail messages from any phone.
http://phone.yahoo.com
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Linux" == Linux Bigot <[email protected]> writes:
Linux> All programmers I am relatively new to linux kernel. Please Linux> advise what is the safe way to get the original virtaul address Linux> from dma address e.g.,
You have to store the address you pass to pci_map_single() somewhere in your data structures together with the dma address.
Jes