* BUG_ON in remap_pte_range: Why?
@ 2003-05-20 20:27 Ravi
2003-05-21 4:20 ` Ed L Cashin
0 siblings, 1 reply; 2+ messages in thread
From: Ravi @ 2003-05-20 20:27 UTC (permalink / raw)
To: linux-mm, kernelnewbies
Hi,
I am looking at the latest mm/memory.c on Bitkeeper.
The comment for remap_pte_range() says "maps a range of
physical memory into the requested pages. the old mappings
are removed". But the code has this check:
BUG_ON(!pte_none(*pte));
Why is it a bug to have a valid PTE when remap_pte_range()
is called? The 2.4 version of this fucntion cleared the
old PTE using ptep_get_and_clear() and then installed
a new one. Why was this changed?
Thanks,
Ravi.
__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com
--
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/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: BUG_ON in remap_pte_range: Why?
2003-05-20 20:27 BUG_ON in remap_pte_range: Why? Ravi
@ 2003-05-21 4:20 ` Ed L Cashin
0 siblings, 0 replies; 2+ messages in thread
From: Ed L Cashin @ 2003-05-21 4:20 UTC (permalink / raw)
To: Ravi; +Cc: linux-mm, kernelnewbies
Ravi <kravi26@yahoo.com> writes:
> Hi,
>
> I am looking at the latest mm/memory.c on Bitkeeper.
> The comment for remap_pte_range() says "maps a range of
> physical memory into the requested pages. the old mappings
> are removed". But the code has this check:
>
> BUG_ON(!pte_none(*pte));
>
> Why is it a bug to have a valid PTE when remap_pte_range()
> is called? The 2.4 version of this fucntion cleared the
> old PTE using ptep_get_and_clear() and then installed
> a new one. Why was this changed?
It used to be a call to forget_pte, and, as Flavio Bruno Leitner
pointed out, wli changed it last year:
http://www.ussg.iu.edu/hypermail/linux/kernel/0206.0/0053.html
... making forget_pte into a macro, which has since been completely
inlined. The comment that used to be above the macro was this:
bug check to be sure pte's are unmapped when no longer used
--
--Ed L Cashin PGP public key: http://noserose.net/e/pgp/
--
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/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-05-21 4:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-20 20:27 BUG_ON in remap_pte_range: Why? Ravi
2003-05-21 4:20 ` Ed L Cashin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox