From: Zwane Mwaikambo <zwane@linux.realnet.co.sz>
To: Martin Maletinsky <maletinsky@scs.ch>
Cc: KernelNewbies <kernelnewbies@nl.linux.org>, linux-mm@kvack.org
Subject: Re: __pa() vs. virt_to_phys()
Date: Sat, 16 Feb 2002 14:32:20 +0200 (SAST) [thread overview]
Message-ID: <Pine.LNX.4.44.0202161430430.23877-100000@netfinity.realnet.co.sz> (raw)
In-Reply-To: <3C6ACC76.6A3D3A36@scs.ch>
On Wed, 13 Feb 2002, Martin Maletinsky wrote:
> Hi,
>
> Is there any reason to use __pa() rather than virt_to_phys() or vice versa?
>
> On i386 virt_to_phys() is just a function that returns the value returned by __pa(); on Alpha virt_to_phys() is a function that subtracts IDENT_ADDR from the argument,
> whereas __pa() is a macro that subtracts PAGE_OFFSET from its argument - however PAGE_OFFSET and IDENT_ADDR expand to the same value; on Sparc virt_to_phys() is a macro
> that expands to __pa().
>
> So the two things look to be pretty much the same on different platforms - is there any reason
> for having __pa() as well as virt_to_phys(), and which one is to be used by device drivers?
Try not to use the underlying calls directly, they may change under you,
although these seem less likely, IOW use the API given to you.
Regards,
Zwane Mwaikambo
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/
prev parent reply other threads:[~2002-02-16 12:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-02-13 20:28 Martin Maletinsky
2002-02-16 12:32 ` Zwane Mwaikambo [this message]
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=Pine.LNX.4.44.0202161430430.23877-100000@netfinity.realnet.co.sz \
--to=zwane@linux.realnet.co.sz \
--cc=kernelnewbies@nl.linux.org \
--cc=linux-mm@kvack.org \
--cc=maletinsky@scs.ch \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox