memory with __get_free_pages and disabling caching

Benjamin Herrenschmidt benh at kernel.crashing.org
Fri Mar 24 14:05:51 EST 2006


On Thu, 2006-03-23 at 18:15 -0800, Kallol Biswas wrote:
> Hello,
>        Is there an easy way to set page table attributes for the
> memory returned
> by __get_free_pages()?
>  
> I need to be able to turn off caching and turn on E bit for these
> pages.

The Evil bit ? heh ! what are you trying to do ? here ... you can always
create a virtual mapping to those pages with different attributes but
that's nor recommended as some processors will shoke pretty badly if you
end up with both cacheable and non-cacheable mappings for the same page.
However, it's not always possible to unmap the initial mapping since
it's common to use things like large pages, BATs, large TLB entries
etc... to map kernel memory..

> I tried to walk through the page tables data structures to get the
> pte, but it seems
> that the pmd is not present for the pages. If someone has done
> investigation
> on this before please send me a reply.
>  
Kernel linear memory isn't necessarily mapped by the page tables. What
are you trying to do and with what processor ?

Ben.






More information about the Linuxppc-dev mailing list