From mboxrd@z Thu Jan 1 00:00:00 1970 From: aftnix@gmail.com (AFT) Date: Fri, 22 Jun 2012 17:49:07 +0600 Subject: explanation of __va() and __pa() macros. Message-ID: To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org Hi, My source is from 2.6 git tree. In LDD3 its said that a logical address is mapped to physical address and vice versa by the macros __va() and __pa(). In my source tree they are defined as follows: #define __va(x) ((void *)((unsigned long) (x))) #define __pa(x) ((unsigned long) (x)) I'm not actually understanding how these "cute" looking casting is performing "address mapping". I thought address mapping involves more complex operations. cheers. aft