New macros that have been born to replace the above ones are
virt_to_page (thusly named by Linus!), which will take a kernel direct
mapped address as input and provide the corresponding struct page. The
other one is VALID_PAGE(), which given a page struct, determines whether
it is a valid page struct and represents _physical_ memory.
Both of virt_to_page and VALID_PAGE are in include/asm*/page.h. I have
tried to make sure there were no mistakes when making the changes for
the various architectures, but I am sure I goofed up a few cases, so
apologies in advance.
Also, as I have suggested before, the pte_page implementation in
sparc/sparc64 should be cleaned up, and the usages of MAP_NR in the
arm code. Russell, Linus has not put in the final patch that will
allow DISCONTIGMEM systems to lay out their mem_map arrays however
they see fit, I have resent it to him, if that is put in, we can get
down to simplifying most of the DISCONTIG arch code.
Thanks.
Kanoj
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/