ARM: Fix sparsemem with SPARSEMEM_EXTREME enabled
authorRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 29 Oct 2009 17:06:17 +0000 (17:06 +0000)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 29 Oct 2009 17:06:17 +0000 (17:06 +0000)
commit657e12fd388899502d47f9f6f9d276ec9ced8add
treecce20de56800ea3b63159e8db69577e761f4e094
parentc06e004c72aa0d1acbc239fb995aa3d823543a8a
ARM: Fix sparsemem with SPARSEMEM_EXTREME enabled

When SPARSEMEM_EXTREME is enabled, memory_present() wants to use bootmem
to allocate data structures.  However, we call memory_present() after
declaring memory to bootmem, but before we've reserved areas.

This leads to sparsemem data structures being overwritten later in the
kernel's initialization (when slab initializes.)

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mm/init.c