]> 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>
Tue, 4 Oct 2011 07:38:34 +0000 (18:38 +1100)
commita341cd4d467f50a5525f39d84cadab5748e53007
tree6913aeffaadfe06c90b612448f5f0506fb6bde04
parent6180c8ef15fac0fc70266e2d5cfcbd4b132ce422
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