From: aftnix@gmail.com (AFT)
To: kernelnewbies@lists.kernelnewbies.org
Subject: explanation of __va() and __pa() macros.
Date: Fri, 22 Jun 2012 17:49:07 +0600 [thread overview]
Message-ID: <y5nfftxo.fsf@s1.test.com> (raw)
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
next reply other threads:[~2012-06-22 11:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-22 11:49 AFT [this message]
2012-06-22 12:06 ` explanation of __va() and __pa() macros Vlad Dogaru
2012-06-22 14:38 ` AFT
2012-06-22 12:12 ` Bjørn Mork
2012-06-22 14:45 ` AFT
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=y5nfftxo.fsf@s1.test.com \
--to=aftnix@gmail.com \
--cc=kernelnewbies@lists.kernelnewbies.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.