]> git.karo-electronics.de Git - karo-tx-linux.git/commit
include/asm-generic/page.h: calculate virt_to_page and page_to_virt via predefined...
authorSonic Zhang <sonic.zhang@analog.com>
Wed, 28 Sep 2011 00:50:15 +0000 (10:50 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 29 Sep 2011 06:08:07 +0000 (16:08 +1000)
commit36aec4f795a62e9aa7327781a657bbd6f603c72f
tree57701d4cc651f2ec8154dcb12d55f69803e64f4d
parent1b2565ec243331d6340086291daaa19889f2046a
include/asm-generic/page.h: calculate virt_to_page and page_to_virt via predefined macro

On NOMMU architectures, if physical memory doesn't start from 0,
ARCH_PFN_OFFSET is defined to generate page index in mem_map array.
Because virtual address is equal to physical address, PAGE_OFFSET is
always 0.  virt_to_page and page_to_virt should not index page by
PAGE_OFFSET directly.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Cc: Greg Ungerer <gerg@snapgear.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <>
include/asm-generic/page.h