]> 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, 5 Oct 2011 00:43:02 +0000 (11:43 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 7 Oct 2011 06:06:39 +0000 (17:06 +1100)
commitdaf988bfda33462d0d17e160a67163624065882b
tree2f0c5064a35c3ada5edb288a58daab52d3351251
parent02801377db1f9a30b7c2e1c3819843b222886858
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 <akpm@linux-foundation.org>
include/asm-generic/page.h