Le Tue, 22 Jan 2008 10:31:14 +0100,
"Vegard Nossum" <[EMAIL PROTECTED]> a écrit :

> It allocates two pages and prints out the virtual address of the page
> itself, then the pte_t* of that address. When run, I get this:
> 
> pte for c7802000 = c0438c78
> pte for c7803000 = c0438c78
> 
> So it seems that the two pages actually share a pte. How is this
> possible? Am I using lookup_address() wrongly?

Probably because the identity mapping of the kernel uses large pages
instead of 4k-pages, so that what you get is not a PTE address, but
rather a PMD address.

Look at the code of lookup_address() :

034         if (pmd_large(*pmd))
035                 return (pte_t *)pmd;

Note that I'm not sure, it's just a quick idea.

Sincerly,

Thomas
-- 
Thomas Petazzoni, [EMAIL PROTECTED]
Free Electrons
http://free-electrons.com

Attachment: signature.asc
Description: PGP signature

Reply via email to