On Tue, Jun 07, 2011 at 10:44:15AM +0200, Marek Szyprowski wrote:
On Tuesday, June 07, 2011 10:06 AM Russell King - ARM Linux wrote:
quoted
NAK. pfn_valid is already defined like this:
int pfn_valid(unsigned long pfn)
{
return memblock_is_memory(pfn << PAGE_SHIFT);
}
provided you enable ARCH_HAS_HOLES_MEMORYMODEL, which you must do if
you're punching holes in the memory map.
Ok, I see the point in ARCH_HAS_HOLES_MEMORYMODEL, but it doesn't solve my
problem. In case of Samsung Exynos4 and S5PV210 platforms we use SPARSEMEM,
but the above definition of pfn_valid() function is correct only if SPARSEMEM
is not enabled.
Sparsemem has been fixed recently (during the merge window) so that this
is now correct.