linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* virt_to_phys for ioremap'd memory
@ 2000-09-25 19:30 Timur Tabi
  2000-09-26  7:49 ` Jeff Garzik
  0 siblings, 1 reply; 2+ messages in thread
From: Timur Tabi @ 2000-09-25 19:30 UTC (permalink / raw)
  To: Linux MM mailing list

Can anyone help me figure out how to do virtual->physical translation on memory
obtained via ioremap()?  I know that you need to have the physical address in
order to call ioremap(), but I don't want to have to remember the physical
address for all the memory blocks that I allocate via ioremap().  It'd be a lot
easier for me to do virt->phys translations on the virtual addresses whenever I
needed them.

I know it has something to do with walking the pgd/pmd/pte chain, but even
after looking at the kernel source code, I can't make heads or tails of it.

Thanks!


-- 
Timur Tabi - ttabi@interactivesi.com
Interactive Silicon - http://www.interactivesi.com

When replying to a mailing-list message, please don't cc: me, because then I'll just get two copies of the same message.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: virt_to_phys for ioremap'd memory
  2000-09-25 19:30 virt_to_phys for ioremap'd memory Timur Tabi
@ 2000-09-26  7:49 ` Jeff Garzik
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2000-09-26  7:49 UTC (permalink / raw)
  To: Timur Tabi; +Cc: Linux MM mailing list

On Mon, 25 Sep 2000, Timur Tabi wrote:

> Can anyone help me figure out how to do virtual->physical translation on memory
> obtained via ioremap()?  I know that you need to have the physical address in
> order to call ioremap(), but I don't want to have to remember the physical
> address for all the memory blocks that I allocate via ioremap().  It'd be a lot
> easier for me to do virt->phys translations on the virtual addresses whenever I
> needed them.
> 
> I know it has something to do with walking the pgd/pmd/pte chain, but even
> after looking at the kernel source code, I can't make heads or tails of it.

Instead of worry about that stuff, bite the bullet and remember the
physical addresses... :)

	Jeff



--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2000-09-26  7:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-09-25 19:30 virt_to_phys for ioremap'd memory Timur Tabi
2000-09-26  7:49 ` Jeff Garzik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox