ARM: Fix pfn_valid() for sparse memory
authorRussell King <rmk@dyn-67.arm.linux.org.uk>
Mon, 7 Sep 2009 14:06:42 +0000 (15:06 +0100)
committerGrazvydas Ignotas <notasas@gmail.com>
Wed, 15 Feb 2012 17:39:08 +0000 (19:39 +0200)
commit75f8180bbfea0127be47410e9107ea6b375300db
tree0a68ad1efab5246dcfd189694f4b52e0c1b70d6d
parentab3fcb75df1ffcd63d16ee0489f65e97c340c203
ARM: Fix pfn_valid() for sparse memory

On OMAP platforms, some people want to declare to segment up the memory
between the kernel and a separate application such that there is a hole
in the middle of the memory as far as Linux is concerned.  However,
they want to be able to mmap() the hole.

This currently causes problems, because update_mmu_cache() thinks that
there are valid struct pages for the "hole".  Fix this by making
pfn_valid() slightly more expensive, by checking whether the PFN is
contained within the meminfo array.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Tested-by: Khasim Syed Mohammed <khasim@ti.com>
arch/arm/include/asm/memory.h
arch/arm/include/asm/page.h
arch/arm/mm/init.c