summaryrefslogtreecommitdiffstats
path: root/arch/arm/include/asm/page.h
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2009-09-07 15:06:42 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2009-09-12 11:48:09 +0100
commitb7cfda9fc3d7aa60cffab5367f2a72a4a70060cd (patch)
treea52c6cdbbc7973a4904ec499a607732832e4ca38 /arch/arm/include/asm/page.h
parent5eb38f44839ec1aade167b125d86d265c886c195 (diff)
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>
Diffstat (limited to 'arch/arm/include/asm/page.h')
-rw-r--r--arch/arm/include/asm/page.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm/include/asm/page.h b/arch/arm/include/asm/page.h
index 9c746af1bf6..3a32af4cce3 100644
--- a/arch/arm/include/asm/page.h
+++ b/arch/arm/include/asm/page.h
@@ -194,6 +194,10 @@ typedef unsigned long pgprot_t;
typedef struct page *pgtable_t;
+#ifndef CONFIG_SPARSEMEM
+extern int pfn_valid(unsigned long);
+#endif
+
#include <asm/memory.h>
#endif /* !__ASSEMBLY__ */