mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 06:44:00 -04:00
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>
This commit is contained in:
committed by
Russell King
parent
5eb38f4483
commit
b7cfda9fc3
@@ -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__ */
|
||||
|
||||
Reference in New Issue
Block a user