lkml.org 
[lkml]   [2004]   [Sep]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: having problems with remap_page_range() and virt_to_phys()
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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:06    [W:0.043 / U:0.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site