]> 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>
Tue, 11 Oct 2011 08:43:48 +0000 (19:43 +1100)
commit3342060c45fb1fdbc72ba8253177b5506582995f
tree94d374593b41ce7cd422ff42cf72aafe462d376f
parent9f92750cc603e558b6fb7955f53db28a660ed4a8
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