From: Chris Friesen <cfriesen@nortelnetworks.com>
To: Hugh Dickins <hugh@veritas.com>
Cc: Linux kernel <linux-kernel@vger.kernel.org>
Subject: Re: having problems with remap_page_range() and virt_to_phys()
Date: Fri, 10 Sep 2004 09:13:34 -0600 [thread overview]
Message-ID: <4141C49E.3070509@nortelnetworks.com> (raw)
In-Reply-To: <Pine.LNX.4.44.0409101501530.16728-100000@localhost.localdomain>
Hugh Dickins wrote:
> On Thu, 9 Sep 2004, Chris Friesen wrote:
> You will need to SetPageReserved(pg) for remap_page_range to map it.
> And no, remembering your earlier pleas, the MM system doesn't clean
> up for you, you'll need to ClearPageReserved and free the page when
> it's all done with (if ever).
Right. I actually did call SetPageReserved(pg), I just forgot to include it in
the code snippet--my test machine is on the other side of the country and I
managed to hose it nicely last night.
> virt_to_phys applies to the kernel virtual address (what you name "virt"
> above), it won't work on a user virtual address, that's something else.
Aha. That may be part of my problem, at least on the verification side.
> But there are plenty
> of examples of using remap_page_range in the kernel source tree, maybe
> not all of them quite correct, but I'd have thought you could work out
> what you need from those examples.
So did I...the code finishes without errors, but the assembly language part
doesn't work properly. (And it does work with another method of getting memory,
but that method breaks as soon as you go highmem...)
Chris
next prev parent reply other threads:[~2004-09-10 15:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-10 0:01 having problems with remap_page_range() and virt_to_phys() Chris Friesen
2004-09-10 14:15 ` Hugh Dickins
2004-09-10 15:13 ` Chris Friesen [this message]
2004-09-10 17:52 ` Chris Friesen
2004-09-10 21:38 ` Chris Friesen
2004-09-10 21:01 ` problems with remap_page_range() and virt_to_phys() -- solved Chris Friesen
[not found] <972562878@toto.iv>
2004-09-10 4:00 ` having problems with remap_page_range() and virt_to_phys() Peter Chubb
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=4141C49E.3070509@nortelnetworks.com \
--to=cfriesen@nortelnetworks.com \
--cc=hugh@veritas.com \
--cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox