]> 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>
Mon, 24 Oct 2011 14:54:15 +0000 (01:54 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 25 Oct 2011 09:07:43 +0000 (20:07 +1100)
commitd5106db176af13f75622b5635ae6ae1984d82fce
tree009dba8a96650a2de23a05fb4253c2b479838c26
parente024de583d6c166d09a8b65bbea8cd3fb85d7056
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