Re: physical to virtual address

Jes Sorensen (Jes.Sorensen@cern.ch)
16 Oct 1999 19:10:20 +0200


>>>>> "Jeff" == Jeff Garzik <jgarzik@pobox.com> writes:

Jeff> Andreas Bombe wrote:
>> On Thu, Oct 14, 1999 at 01:08:51PM +0100, Jose Miguel Pereira
>> Tavares wrote: > How can I translate a physical address to a
>> virtual address? > I have allready look to io.h phys_to_virt, but
>> I'm not sure that is > doing the right thing - a guess it's just
>> for io address (bellow 1Mb I > believe).
>>
>> phys_to_virt is the right thing.

Jeff> No, you most likely want to use ioremap. Just doing
Jeff> phys_to_virt usually isn't enough.

And if we are talking bus addresses like PCI shared memory,
bus_to_virt() is the right one to use. phys_to_virt() is basically
only to be used by the memory management code.

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/