From: Brian Gerst <bgerst@didntduck.org>
To: mdaljeet@in.ibm.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: pte_page
Date: Wed, 30 May 2001 08:26:55 -0400 [thread overview]
Message-ID: <3B14E70F.F7E7D4BA@didntduck.org> (raw)
In-Reply-To: <CA256A5C.002E4CF0.00@d73mta01.au.ibm.com>
mdaljeet@in.ibm.com wrote:
>
> I use the 'pgt_offset', 'pmd_offset', 'pte_offset' and 'pte_page' inside a
> module to get the physical address of a user space virtual address. The
> physical address returned by 'pte_page' is not page aligned whereas the
> virtual address was page aligned. Can somebody tell me the reason?
>
> Also, can i use these functions to get the physical address of a kernel
> virtual address using init_mm?
pte_page() returns the struct page * for the page, not the page
address. To get the physical address of a page use __pa(virtaddr), but
this works if and only if the page is not highmem and not vmalloced.
--
Brian Gerst
next prev parent reply other threads:[~2001-05-30 12:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-05-30 8:01 pte_page mdaljeet
2001-05-30 12:26 ` Brian Gerst [this message]
2001-05-30 12:38 ` pte_page Brian Gerst
2001-05-30 14:09 ` pte_page Ingo Molnar
2001-05-30 17:08 ` pte_page Pete Wyckoff
2001-05-30 17:39 ` pte_page Ingo Molnar
-- strict thread matches above, loose matches on Subject: below --
2001-05-31 9:57 pte_page mdaljeet
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=3B14E70F.F7E7D4BA@didntduck.org \
--to=bgerst@didntduck.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mdaljeet@in.ibm.com \
/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