difference between ioremap_page_range and vmap_page_range
This may be a very basic question but I am trying to understand the difference between ioremap_page_range() and vmap_page_range(). Both seem to map a physical address to a virtual address (in a newly allocated VM area).
Both functions take 4 argument each and 3 of them are same. ioremap_page_range takes a phys_addr_t and vmap_page_range takes an array of page (frame) pointers.
My question is can these functions be used interchangeably (assuming I take care of 4rth differing argument) or is there any difference in what these functions would achieve?
Any specific pointers to a text or link which explains these functions will be highly helpful.
The implementation are quite same, in theory you can use the both to create a memory mapping. However, ioremap is used to map a IO resource, which is not a physical page in linux kernel, vmap_page_range should be used to map a physical memory (RAM region) which is present in page pools. By the way, mapping property value usually are different when they are used. (for example, cached or uncached...)