On 8/10/06, Rahul Iyer <idlisambar@xxxxxxxxx> wrote:
io_remap maps device registers to a virtual address. So, by definition,
it is not backed by physical memory. So, __pa() shouldn't make sense,
right?
what did you mean by " backed by physical memory " ?
why shouldn't it make sense ?? device registers are memory mapped thus its as normal as any other memory available ( unless the caching issue comes in) !!!
Besides, __pa() doesn't go through the page tables as Sebastian pointed
out. All __pa() does is subtract PAGE_OFFSET from the address. Now, if
you look at the code for __ioremap() which is called by ioremap(), it
maps it to a virtual address that was unused. So, it *never* has a
physical mapping anyways.
ok, on looking at the code for __ioremap i have been able to make out that ioremap fills up the page vm area and thus setting the page tables.
still there is confusion regarding addresses returned by __va . how does these addresses simply help the processor to locate the memory with the address (x + PAGE_OFFSET) when there are no page table mappings at all ?
regards
Srinivas