[PATCH] ARM: fix ioremap to allow mapping some specific RAM areas

Russell King - ARM Linux linux at arm.linux.org.uk
Tue Jun 7 04:54:46 EDT 2011


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:
> > 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.



More information about the linux-arm-kernel mailing list