kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* explanation of __va() and __pa() macros.
@ 2012-06-22 11:49 AFT
  2012-06-22 12:06 ` Vlad Dogaru
  2012-06-22 12:12 ` Bjørn Mork
  0 siblings, 2 replies; 5+ messages in thread
From: AFT @ 2012-06-22 11:49 UTC (permalink / raw)
  To: kernelnewbies


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:

<include/asm-generic/page.h>

#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 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-06-22 14:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-22 11:49 explanation of __va() and __pa() macros AFT
2012-06-22 12:06 ` Vlad Dogaru
2012-06-22 14:38   ` AFT
2012-06-22 12:12 ` Bjørn Mork
2012-06-22 14:45   ` AFT

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).