On Mon, 8 Sep 2003, Kirk True wrote: > Hi, > > > What is __pa(x) function, it said that it translates logical address to > > physical address by x-PAGE_OFFSET, PAGE_OFFSET is normally something > > like 0xc0000000, how can this translate? What is x input? > > x is a virtual address. Virtual addresses are the physical addresses > plus PAGE_OFFSET. So to go *back* to a virtual address from a physical > address as the __pa macro does, you simply do the reverse operation and > subtract PAGE_OFFSET. > __pa(x) gives the physical address of the given virtual address - x. this works only for kernel memory and not for user memory. Raghu > That's my understanding, anyway. I'm a newbie too and it might not be > that simple. > > Kirk > > -- > Kernelnewbies: Help each other learn about the Linux kernel. > Archive: http://mail.nl.linux.org/kernelnewbies/ > FAQ: http://kernelnewbies.org/faq/ > -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/