Re: Question about ioremap and io_remap_page_range

From: Russell King (
Date: Thu Sep 27 2001 - 03:16:01 EST

On Thu, Sep 27, 2001 at 10:03:26AM +0200, Armin Schindler wrote:
> virt_to_phys() is obsolete ? What should be used if I need the phys address
> of a memory page ? (e.g. for mmap() remapping)

virt_to_phys is only valid on the kernel direct mapped RAM area - memory
returned from kmalloc and non-highmem memory returned from get_free_page.

Since vmalloc and ioremap do not return a pointer into the direct mapped
RAM area, but its own mapping, it is not valid to use virt_to_phys on
these returned values, even through it might be a virtual address.

Russell King (                The developer of ARM Linux

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to More majordomo info at Please read the FAQ at

This archive was generated by hypermail 2b29 : Sun Sep 30 2001 - 21:00:54 EST